Commit 1bcf5d02 authored by Phil Sainty's avatar Phil Sainty

* lisp/vc/diff.el (diff-buffer-with-file): Support indirect buffers.

(Bug#32195)
parent 177deaf9
......@@ -226,8 +226,9 @@ With prefix arg, prompt for diff switches."
"View the differences between BUFFER and its associated file.
This requires the external program `diff' to be in your `exec-path'."
(interactive "bBuffer: ")
(with-current-buffer (get-buffer (or buffer (current-buffer)))
(diff buffer-file-name (current-buffer) nil 'noasync)))
(let ((buf (get-buffer (or buffer (current-buffer)))))
(with-current-buffer (or (buffer-base-buffer buf) buf)
(diff buffer-file-name (current-buffer) nil 'noasync))))
(provide 'diff)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment