[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24725: 25.1.50; vc-region-history may exceed max line number of file
From: |
Andreas Schwab |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
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."