branch: externals/transient commit 8cc2415a543a1f59b7ee973979daf080aa04c55d Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
transient--delete-window: Get transient buffer by name We try to dedicate the transient window to the transient buffer, but that does not actually guarantee that it is not used to displayed another buffer. Normally displaying another buffer in this window would be fatal, but if it happens when displaying the *Help* buffer, then that works out okay, as long as we avoid immediately killing that buffer again. Closes #271. --- lisp/transient.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/transient.el b/lisp/transient.el index 7f7d66c505..fce6c94acb 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -2231,14 +2231,14 @@ value. Otherwise return CHILDREN as is." (when (window-live-p transient--window) (let ((remain-in-minibuffer-window (and (minibuffer-selected-window) - (selected-window))) - (buf (window-buffer transient--window))) + (selected-window)))) ;; Only delete the window if it has never shown another buffer. (unless (eq (car (window-parameter transient--window 'quit-restore)) 'other) (with-demoted-errors "Error while exiting transient: %S" (delete-window transient--window))) - (kill-buffer buf) + (when-let ((buffer (get-buffer transient--buffer-name))) + (kill-buffer buffer)) (when remain-in-minibuffer-window (select-window remain-in-minibuffer-window)))))