# HG changeset patch # User Chong Yidong # Date 1236646749 0 # Node ID 8e50ad0da4e8f12bfcc5932592e2f48a730b25fe # Parent bb3e98d00c39038b50d867bc73060c2ecba300bd (vc-annotate): Use widened line number (Bug#2612). diff -r bb3e98d00c39 -r 8e50ad0da4e8 lisp/vc-annotate.el --- a/lisp/vc-annotate.el Tue Mar 10 00:59:00 2009 +0000 +++ b/lisp/vc-annotate.el Tue Mar 10 00:59:09 2009 +0000 @@ -362,7 +362,10 @@ ;; 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