From 972bf25aaa5aecc4a374f934c0b6b8c2f30d4981 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 10 Mar 2009 00:59:09 +0000 Subject: [PATCH] (vc-annotate): Use widened line number (Bug#2612). --- lisp/vc-annotate.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/vc-annotate.el b/lisp/vc-annotate.el index 190bf78b8c6..22ff3dac992 100644 --- a/lisp/vc-annotate.el +++ b/lisp/vc-annotate.el @@ -362,7 +362,10 @@ mode-specific menu. `vc-annotate-color-map' and ;; If BUF is specified, we presume the caller maintains current line, ;; so we don't need to do it here. This implementation may give ;; strange results occasionally in the case of REV != WORKFILE-REV. - (current-line (or move-point-to (unless buf (line-number-at-pos))))) + (current-line (or move-point-to (unless buf + (save-restriction + (widen) + (line-number-at-pos)))))) (message "Annotating...") ;; If BUF is specified it tells in which buffer we should put the ;; annotations. This is used when switching annotations to another -- 2.39.5