Skip to content

Commit

Permalink
transient--make-predicate-map: Only return if there is a parent
Browse files Browse the repository at this point in the history
Only prepare to return to the parent transient if there actually
is a parent.  The only negative effect of failing to do this was
that the suffix was colored wrong, since `transient--do-return'
falls back to behave like `transient--do-exit'.
  • Loading branch information
tarsius committed Nov 29, 2023
1 parent 9050a0d commit 5f2cfc9
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 @@ -1810,7 +1810,7 @@ of the corresponding object."
(defun transient--make-predicate-map ()
(let* ((default (transient--resolve-pre-command
(oref transient--prefix transient-suffix)))
(return (eq default t))
(return (and transient-current-prefix (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 5f2cfc9

Please sign in to comment.