branch: externals/transient
commit 4498fec575e1aedb672b04f7525254de3f4bc553
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    transient--preserve-window-p: New function
---
 lisp/transient.el | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index ff405c3a0a..aa4cbe84ce 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2580,13 +2580,7 @@ value.  Otherwise return CHILDREN as is.")
 (defun transient--suspend-override (&optional nohide)
   (transient--debug 'suspend-override)
   (transient--timer-cancel)
-  (let ((show (if nohide 'fixed transient-show-during-minibuffer-read)))
-    (when (and (integerp show)
-               (window-live-p transient--window)
-               (< (frame-height (window-frame transient--window))
-                  (+ (abs show)
-                     (window-height transient--window))))
-      (setq show (natnump show)))
+  (let ((show (transient--preserve-window-p nohide)))
     (cond ((not show)
            (transient--delete-window))
           ((and transient--prefix transient--redisplay-key)
@@ -4152,6 +4146,16 @@ have a history of their own.")
     (kill-buffer transient--buffer))
   (setq transient--buffer nil))
 
+(defun transient--preserve-window-p (nohide)
+  (let ((show (if nohide 'fixed transient-show-during-minibuffer-read)))
+    (when (and (integerp show)
+               (window-live-p transient--window)
+               (< (frame-height (window-frame transient--window))
+                  (+ (abs show)
+                     (window-height transient--window))))
+      (setq show (natnump show)))
+    show))
+
 ;;; Format
 
 (defun transient--format-hint ()

Reply via email to