Skip to content

Commit b6d9e3e

Browse files
committed
diff-hl-diff-buffer-with-reference: Fix in indirect buffers
#284
1 parent ca4391f commit b6d9e3e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

diff-hl.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,8 @@ The diffs are computed in the buffer DEST-BUFFER. This requires
15381538
the `diff-program' to be in your `exec-path'.
15391539
CONTEXT-LINES is the size of the unified diff context, defaults to 0."
15401540
(require 'diff)
1541-
(vc-ensure-vc-buffer)
1541+
(unless (or backend (vc-backend file))
1542+
(error "File %s is not under version control" file))
15421543
(save-current-buffer
15431544
(let* ((dest-buffer (or dest-buffer "*diff-hl-diff-buffer-with-reference*"))
15441545
(backend (or backend (vc-backend file)))

0 commit comments

Comments
 (0)