Make 'double-click' behave the same as 'enter' by default

Close #3061
This commit is contained in:
Junegunn Choi
2022-11-29 20:24:18 +09:00
parent 6b7a543c82
commit 8f4c89f50e
3 changed files with 15 additions and 1 deletions

View File

@@ -1851,6 +1851,11 @@ func postProcessOptions(opts *Options) {
}
opts.Keymap = keymap
// 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()]
}
if opts.Height.auto {
for _, s := range []sizeSpec{opts.Margin[0], opts.Margin[2]} {
if s.percent {