Skip to content

Commit

Permalink
transient--premature-post-command failed to unset transient-current-*
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Oct 31, 2024
1 parent cb11650 commit 2660b9d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lisp/transient.el
Original file line number Diff line number Diff line change
Expand Up @@ -2565,7 +2565,7 @@ value. Otherwise return CHILDREN as is."
(oset (or transient--prefix transient-current-prefix)
unwind-suffix
(if transient--exitp
#'transient--post-exit
(lambda (command) (transient--post-exit command t))
#'transient--resume-override))
t)))

Expand Down Expand Up @@ -2600,7 +2600,7 @@ value. Otherwise return CHILDREN as is."
(setq transient-current-command nil)
(setq transient-current-suffixes nil)))

(defun transient--post-exit (&optional command)
(defun transient--post-exit (&optional command unwind)
(transient--debug 'post-exit)
(unless (and (eq transient--exitp 'replace)
(or transient--prefix
Expand Down Expand Up @@ -2631,6 +2631,10 @@ value. Otherwise return CHILDREN as is."
(setq transient--all-levels-p nil)
(setq transient--minibuffer-depth 0)
(run-hooks 'transient-exit-hook)
(when unwind
(setq transient-current-prefix nil)
(setq transient-current-command nil)
(setq transient-current-suffixes nil))
(when resume
(transient--stack-pop))))

Expand Down

0 comments on commit 2660b9d

Please sign in to comment.