unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Tino Calancha <tino.calancha@gmail.com>
Cc: 24725@debbugs.gnu.org, Dmitry Gutov <dgutov@yandex.ru>
Subject: bug#24725: 25.1.50; vc-region-history may exceed max line number of file in repository
Date: Thu, 20 Oct 2016 09:27:22 +0200	[thread overview]
Message-ID: <mvmeg3bo4yt.fsf@hawking.suse.de> (raw)
In-Reply-To: <8737jrejkd.fsf@gmail.com> (Tino Calancha's message of "Thu, 20 Oct 2016 13:22:10 +0900")

On Okt 20 2016, Tino Calancha <tino.calancha@gmail.com> wrote:

> diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
> index 9eac5b2..c6a9064 100644
> --- a/lisp/vc/vc-git.el
> +++ b/lisp/vc/vc-git.el
> @@ -1016,6 +1016,8 @@ vc-git-region-history
>    ;; FIXME: Maybe this should be done in vc.el (i.e. for all backends), but
>    ;; since Git is the only backend to support this operation so far, it's hard
>    ;; to tell.
> +  (when (> lto (line-number-at-pos (1- (point-max))))
> +    (setq lto (line-number-at-pos (1- (point-max)))))

Shouldn't that be fixed in the caller, and lto always be decremented if
the regions ends at bol?

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."





  reply	other threads:[~2016-10-20  7:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18 14:27 bug#24725: 25.1.50; vc-region-history may exceed max line number of file in repository Tino Calancha
2016-10-19 23:22 ` Dmitry Gutov
2016-10-20  4:22   ` Tino Calancha
2016-10-20  7:27     ` Andreas Schwab [this message]
2016-10-20  8:09       ` Tino Calancha
2016-10-20 10:21         ` Dmitry Gutov
2016-10-20 10:44           ` Tino Calancha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mvmeg3bo4yt.fsf@hawking.suse.de \
    --to=schwab@suse.de \
    --cc=24725@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=tino.calancha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).