Skip to content

Commit

Permalink
transient--make-predicate-map: Fix detecting outer prefix
Browse files Browse the repository at this point in the history
Since [1: 5f2cfc9] we try to detect whether there is an outer
prefix, that non-transient suffixes could return to, by checking
if `transient--current-prefix' is non-nil.  That works then the
prefix is created, but that variable is also always non-nil after
a transient suffix is invoked.  Instead check if `transient--stack'
is non-nil.

1: 2023-11-29 5f2cfc9
   transient--make-predicate-map: Only return if there is a parent
  • Loading branch information
tarsius committed Jan 20, 2024
1 parent f582a9b commit f51c144
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lisp/transient.el
Original file line number Diff line number Diff line change
Expand Up @@ -1831,7 +1831,7 @@ of the corresponding object."
(defun transient--make-predicate-map ()
(let* ((default (transient--resolve-pre-command
(oref transient--prefix transient-suffix)))
(return (and transient-current-prefix (eq default t)))
(return (and transient--stack (eq default t)))
(map (make-sparse-keymap)))
(set-keymap-parent map transient-predicate-map)
(when (or (and (slot-boundp transient--prefix 'transient-switch-frame)
Expand Down

0 comments on commit f51c144

Please sign in to comment.