m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 07:13:48 -05:00

Add 'unbind' action

Fix #2486
This commit is contained in:
Junegunn Choi
2021-05-22 13:13:55 +09:00
parent 34f0d4d0c4
commit 347c4b2625
6 changed files with 101 additions and 4 deletions

View File

@@ -284,6 +284,7 @@ const (
actEnableSearch
actSelect
actDeselect
actUnbind
)
type placeholderFlags struct {
@@ -2657,6 +2658,11 @@ func (t *Terminal) Loop() {
command := t.replacePlaceholder(a.a, false, string(t.input), list)
newCommand = &command
}
case actUnbind:
keys := parseKeyChords(a.a, "PANIC")
for key := range keys {
delete(t.keymap, key)
}
}
return true
}