summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2026-03-05 22:44:46 +0100
committerJonas Bernoulli <jonas@bernoul.li>2026-03-05 22:44:46 +0100
commitcde0756fb1e30fa1629a2b69f1dfe0f12510adcf (patch)
treeb34ededd06db5545c3d9554c9d15801a8dcec4c6
parent6e836a596e01e9eca311b66328767f3c4025f1ee (diff)
transient-infix-read: Use current value as initial input
Usually the infix is unset if invoked while it has value. It then has to be invoked a second time to set another value. During that second value the previous value is used as initial-input because it was previously added to the history and we already explicitly use that here. However when `always-read' is non-nil, the infix isn't toggled off like this and we have to pass along the current value as initial- input on the first and only invocation.
-rw-r--r--lisp/transient.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/transient.el b/lisp/transient.el
index 33de668..379c888 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3982,8 +3982,9 @@ it\", in which case it is pointless to preserve history.)"
(eq value (car transient--history)))
transient--history
(cons value transient--history)))
- (initial-input (and transient-read-with-initial-input
- (car transient--history)))
+ (initial-input (or value
+ (and transient-read-with-initial-input
+ (car transient--history))))
(history (if initial-input
(cons 'transient--history 1)
'transient--history))