[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vertico e130a94588 1/2: vertico-buffer: Do not attempt
From: |
ELPA Syncer |
Subject: |
[elpa] externals/vertico e130a94588 1/2: vertico-buffer: Do not attempt to delete non-live window |
Date: |
Mon, 4 Sep 2023 15:58:53 -0400 (EDT) |
branch: externals/vertico
commit e130a945888439897630be3c945a0ecc0f8a868d
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
vertico-buffer: Do not attempt to delete non-live window
---
extensions/vertico-buffer.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/extensions/vertico-buffer.el b/extensions/vertico-buffer.el
index b9dcfe4ea2..df01933a9b 100644
--- a/extensions/vertico-buffer.el
+++ b/extensions/vertico-buffer.el
@@ -134,12 +134,14 @@
(fset sym (lambda ()
(when (= depth (recursion-depth))
(with-selected-window (active-minibuffer-window)
- (if (not (and (window-live-p win) (buffer-live-p old-buf)))
- (delete-window win)
+ (cond
+ ((and (window-live-p win) (buffer-live-p old-buf))
(set-window-parameter win 'no-other-window now)
(set-window-parameter win 'no-delete-other-windows ndow)
(set-window-dedicated-p win nil)
(set-window-buffer win old-buf))
+ ((window-live-p win)
+ (delete-window win)))
(when vertico-buffer-hide-prompt
(set-window-vscroll nil 0))
(remove-hook 'minibuffer-exit-hook sym)))))