From: Chong Yidong Date: Tue, 10 Mar 2009 00:59:09 +0000 (+0000) Subject: (vc-annotate): Use widened line number (Bug#2612). X-Git-Tag: emacs-pretest-23.0.92~293 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=972bf25aaa5aecc4a374f934c0b6b8c2f30d4981;p=emacs.git (vc-annotate): Use widened line number (Bug#2612). --- 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