summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2023-11-29 18:14:39 +0100
committerJonas Bernoulli <jonas@bernoul.li>2023-11-29 18:14:39 +0100
commit5f2cfc9f73e756fb337df70909fcd3d0bce56911 (patch)
treef211c46100dc84d1161af26b3ee1ab745dfb73a9
parent9050a0d058041e5e54d4e16359fd061e779c2ecb (diff)
transient--make-predicate-map: Only return if there is a parent
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'.
-rw-r--r--lisp/transient.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/transient.el b/lisp/transient.el
index 99a9831..d1dd44d 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -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)