diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2024-01-05 14:13:11 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2024-01-05 14:13:11 +0100 |
| commit | 8cc2415a543a1f59b7ee973979daf080aa04c55d (patch) | |
| tree | 5d0b097dbe5f267f60bbc3bc502f8be2f1b68faa | |
| parent | 6872fb84d78938c06969c25dc99204a5c9b1dbc0 (diff) | |
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.
| -rw-r--r-- | lisp/transient.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/transient.el b/lisp/transient.el index 7f7d66c..fce6c94 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))))) |
