summaryrefslogtreecommitdiff
path: root/lisp/vc/vc.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/vc/vc.el')
-rw-r--r--lisp/vc/vc.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 93e9c25cbfd..01dc47e8089 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2420,11 +2420,13 @@ When called interactively with a prefix argument, prompt for REMOTE-LOCATION."
If called interactively, show the history between point and
mark."
(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*")))
+ (unless backend
+ (error "Buffer is not version controlled"))
(with-current-buffer buf
(setq-local vc-log-view-type 'long))
(vc-call region-history file buf lfrom lto)