[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 8a8b81c1e4: Make ediff-show-diff-output work better on unsaved bu
From: |
Lars Ingebrigtsen |
Subject: |
master 8a8b81c1e4: Make ediff-show-diff-output work better on unsaved buffers |
Date: |
Mon, 9 May 2022 08:06:46 -0400 (EDT) |
branch: master
commit 8a8b81c1e48a45ca187623f3c45d0c332bcd45ac
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Make ediff-show-diff-output work better on unsaved buffers
* lisp/vc/ediff-util.el (ediff-show-diff-output): Make the `D'
command work on unsaved buffers without a prefix (bug#45016).
---
lisp/vc/ediff-util.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el
index b41def2aff..f140f14559 100644
--- a/lisp/vc/ediff-util.el
+++ b/lisp/vc/ediff-util.el
@@ -3431,6 +3431,9 @@ Without an argument, it saves customized diff argument,
if available
))
(defun ediff-show-diff-output (arg)
+ "With prefix argument ARG, show plain diff output.
+Without an argument, it saves customized diff argument, if available
+(and plain output, if customized output was not generated)."
(interactive "P")
(ediff-barf-if-not-control-buffer)
(ediff-compute-custom-diffs-maybe)
@@ -3438,7 +3441,10 @@ Without an argument, it saves customized diff argument,
if available
(ediff-skip-unsuitable-frames ' ok-unsplittable))
(let ((buf (cond ((and arg (ediff-buffer-live-p ediff-diff-buffer))
ediff-diff-buffer)
- ((ediff-buffer-live-p ediff-custom-diff-buffer)
+ ((and (ediff-buffer-live-p ediff-custom-diff-buffer)
+ ;; We may not have gotten a custom output if
+ ;; we're working on unsaved buffers.
+ (> (buffer-size ediff-custom-diff-buffer) 0))
ediff-custom-diff-buffer)
((ediff-buffer-live-p ediff-diff-buffer)
ediff-diff-buffer)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 8a8b81c1e4: Make ediff-show-diff-output work better on unsaved buffers,
Lars Ingebrigtsen <=