]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix vc-region-history when narrowed
authorCharles A. Roelli <charles@aurox.ch>
Wed, 20 Dec 2017 19:52:45 +0000 (20:52 +0100)
committerCharles A. Roelli <charles@aurox.ch>
Wed, 20 Dec 2017 19:57:42 +0000 (20:57 +0100)
* lisp/vc/vc.el (vc-region-history): Fix behavior when narrowed, by using
line numbers starting from (point-min).

lisp/vc/vc.el

index b1599915007c99797dbecb9952350f53d7f74e50..f48f682096432b3309b1dbf82b5e89892c14a318 100644 (file)
@@ -2417,8 +2417,8 @@ When called interactively with a prefix argument, prompt for REMOTE-LOCATION."
 (defun vc-region-history (from to)
   "Show the history of the region FROM..TO."
   (interactive "r")
-  (let* ((lfrom (line-number-at-pos from))
-         (lto   (line-number-at-pos (1- to)))
+  (let* ((lfrom (line-number-at-pos from t))
+         (lto   (line-number-at-pos (1- to) t))
          (file buffer-file-name)
          (backend (vc-backend file))
          (buf (get-buffer-create "*VC-history*")))