From: Charles A. Roelli Date: Wed, 20 Dec 2017 19:52:45 +0000 (+0100) Subject: Fix vc-region-history when narrowed X-Git-Tag: emacs-27.0.90~5993 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9f1c613b07e4a745671af5818366660e3765984d;p=emacs.git Fix vc-region-history when narrowed * lisp/vc/vc.el (vc-region-history): Fix behavior when narrowed, by using line numbers starting from (point-min). --- diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index b1599915007..f48f6820964 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -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*")))