]> code.delx.au - gnu-emacs/commitdiff
(vc-annotate): Use widened line number (Bug#2612).
authorChong Yidong <cyd@stupidchicken.com>
Tue, 10 Mar 2009 00:59:09 +0000 (00:59 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Tue, 10 Mar 2009 00:59:09 +0000 (00:59 +0000)
lisp/vc-annotate.el

index 190bf78b8c6392ca31b176b21752c8b9d4c65a2d..22ff3dac9924f2ec5012ef2ee910bc032b26a849 100644 (file)
@@ -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