diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2026-03-21 00:19:27 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2026-03-21 00:19:27 +0100 |
| commit | adaf4e06e541745216bfabf8c4af1812f15ae7d1 (patch) | |
| tree | b9260cd12875af608c14227f73c9086c3ba787cc | |
| parent | c8e4251fd165acd32e014e6310f2219991bea357 (diff) | |
transient-infix-read: Avoid turning nil into "" if multi-value is non-nil
If STRINGS is nil, `string-join' returns the empty string, not nil.
Closes #434.
| -rw-r--r-- | lisp/transient.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/transient.el b/lisp/transient.el index 9ca41b6..eda4265 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -3986,7 +3986,9 @@ it\", in which case it is pointless to preserve history.)" (reader (oref obj reader)) (choices (if (functionp choices) (funcall choices) choices)) (prompt (transient-prompt obj)) - (value (if multi-value (string-join value ",") value)) + (value (if (and multi-value value) + (string-join value ",") + value)) (history-key (or (oref obj history-key) (oref obj command))) (transient--history (alist-get history-key transient-history)) |
