Allow bare put action in transform output

transform/bg-transform now permit bare `put`, inserting the key that
triggered the action (`a:transform:echo put` puts `a`).
This commit is contained in:
Junegunn Choi
2026-06-02 20:21:04 +09:00
parent 7d647c70c2
commit ae78a5c56d
6 changed files with 33 additions and 9 deletions
+2 -1
View File
@@ -6973,7 +6973,8 @@ func (t *Terminal) Loop() error {
})
case actTransform, actBgTransform:
capture(false, func(body string) {
if actions, err := parseSingleActionList(strings.Trim(body, "\r\n")); err == nil {
// Allow 'put' if the triggering key is a printable character
if actions, err := parseSingleActionList(strings.Trim(body, "\r\n"), event.Printable()); err == nil {
// NOTE: We're not properly passing the return value here
doActions(actions)
}