|
From: | Dmitry Gutov |
Subject: | bug#24725: 25.1.50; vc-region-history may exceed max line number of file in repository |
Date: | Thu, 20 Oct 2016 02:22:32 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0 |
Hi! On 18.10.2016 17:27, Tino Calancha wrote:
emacs -Q lisp/vc/vc.el C-x h M-x vc-region-history RET fatal: file vc.el has only 2921 lines ;; vc.el has 2922 lines but Git ignores the last empty line.
With your patch, what will happen if the file does not end with a newline (which can be some people's or tools' preference)?
Currently, in that case the above scenario works fine. Maybe we need a different check, rather than substracting.
Or try (line-number-at-pos (1- (point-max))) instead of (1- (line-number-at-pos (point-max))).
[Prev in Thread] | Current Thread | [Next in Thread] |