emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/consult b50118f6e9 4/4: Simplify consult--buffer-previe


From: ELPA Syncer
Subject: [elpa] externals/consult b50118f6e9 4/4: Simplify consult--buffer-preview again
Date: Thu, 7 Apr 2022 19:57:23 -0400 (EDT)

branch: externals/consult
commit b50118f6e9ddf296c48e052d8b8d6dc6fa419e6f
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Simplify consult--buffer-preview again
---
 consult.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/consult.el b/consult.el
index e95d53c991..54ddc9bd30 100644
--- a/consult.el
+++ b/consult.el
@@ -4142,12 +4142,13 @@ Report progress and return a list of the results"
     (lambda (action cand)
       ;; Only preview in current window and other window.
       ;; Preview in frames and tabs is not possible since these don't get 
cleaned up.
-      (when (or (eq consult--buffer-display #'switch-to-buffer)
+      (when (or (eq action 'preview)
+                (eq consult--buffer-display #'switch-to-buffer)
                 (eq consult--buffer-display #'switch-to-buffer-other-window))
         (cond
-         ((and cand (eq action 'preview) (get-buffer cand))
+         ((and cand (get-buffer cand))
           (consult--buffer-action cand 'norecord))
-         ((and (memq action '(preview exit)) (buffer-live-p orig-buf))
+         ((buffer-live-p orig-buf)
           (consult--buffer-action orig-buf 'norecord)))))))
 
 (defun consult--buffer-action (buffer &optional norecord)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]