FZF_KEY enhancements

* 'enter' instead of 'ctrl-m'
* 'space' instead of ' '
This commit is contained in:
Junegunn Choi
2025-02-02 01:48:52 +09:00
parent 178b49832e
commit 32234be7a2
8 changed files with 73 additions and 12 deletions

View File

@@ -885,7 +885,7 @@ func parseKeyChordsImpl(str string, message string) (map[tui.Event]string, error
case "right":
add(tui.Right)
case "enter", "return":
add(tui.CtrlM)
add(tui.Enter)
case "space":
chords[tui.Key(' ')] = key
case "backspace", "bspace", "bs":
@@ -3220,7 +3220,7 @@ func postProcessOptions(opts *Options) error {
// If 'double-click' is left unbound, bind it to the action bound to 'enter'
if _, prs := opts.Keymap[tui.DoubleClick.AsEvent()]; !prs {
opts.Keymap[tui.DoubleClick.AsEvent()] = opts.Keymap[tui.CtrlM.AsEvent()]
opts.Keymap[tui.DoubleClick.AsEvent()] = opts.Keymap[tui.Enter.AsEvent()]
}
// If we're not using extended search mode, --nth option becomes irrelevant