m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 15:53:39 -05:00

Revert "An '--expect' key should execute actions bound to the key"

To be backward compatible.

Close #3829
This commit is contained in:
Junegunn Choi
2024-06-01 13:20:12 +09:00
parent dbe8dc344e
commit 41bcbe342f
3 changed files with 17 additions and 13 deletions

View File

@@ -3608,6 +3608,14 @@ func (t *Terminal) Loop() error {
}
t.mutex.Lock()
for key, ret := range t.expect {
if keyMatch(key, event) {
t.pressed = ret
t.reqBox.Set(reqClose, nil)
t.mutex.Unlock()
return nil
}
}
previousInput := t.input
previousCx := t.cx
t.lastKey = event.KeyName()
@@ -4460,18 +4468,6 @@ func (t *Terminal) Loop() error {
return true
}
for key, ret := range t.expect {
if keyMatch(key, event) {
t.pressed = ret
if actions, found := t.keymap[key]; found {
doActions(actions)
}
t.reqBox.Set(reqClose, nil)
t.mutex.Unlock()
return nil
}
}
if t.jumping == jumpDisabled || len(actions) > 0 {
// Break out of jump mode if any action is submitted to the server
if t.jumping != jumpDisabled {