branch: externals/transient commit 625683c9eab7fb53f65b27ffbe04afebcaae892a Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
transient--pre-exit: Don't reselect original window Doing so would prevent the use of a transient to do window management. It is also not necessary. If a suffix unintentionally selects another window, then that is a bug; don't try to work around such bugs. --- docs/CHANGELOG | 6 ++++++ lisp/transient.el | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 282545e91e..c593c0fd22 100644 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -1,6 +1,12 @@ # -*- mode: org -*- * v0.2.0 UNRELEASED +- The window that was selected before the transient window was shown + is no longer re-selected before calling a suffix that exits the + transient. If a suffix changes the selected window unintentionally, + then that is a bug. This makes it possible to intentionally change + the window layout using transients. + - An infix is a special kind of suffix. Depending on context "suffixes" means "suffixes (including infixes)" or "non-infix suffixes". This is now mention in a few places where users might diff --git a/lisp/transient.el b/lisp/transient.el index 792ef9a028..1e176402d3 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -1438,9 +1438,7 @@ EDIT may be non-nil." (defun transient--pre-exit () (transient--debug 'pre-exit) - (let ((window (selected-window))) - (lv-delete-window) - (select-window window)) + (transient--delete-window) (transient--timer-cancel) (transient--pop-keymap 'transient--transient-map) (transient--pop-keymap 'transient--redisplay-map)