branch: externals/transient
commit cde0756fb1e30fa1629a2b69f1dfe0f12510adcf
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
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.
---
lisp/transient.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index 33de668691..379c88894c 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))