diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2019-11-17 18:02:29 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-11-21 22:07:14 +1100 |
commit | 64017cf8745258cc6d4838a602295b8281585b9f (patch) | |
tree | 74bdee94768dd6567e9e0ff9445b3d26bf97bc13 /pkg/gui | |
parent | b3bce8a1bacc602b25ad367c943c01b9cc6d2c10 (diff) |
require double clicking menu items so you know what you're clicking
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/list_view.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/gui/list_view.go b/pkg/gui/list_view.go index 141d0c8d1..3a93bd526 100644 --- a/pkg/gui/list_view.go +++ b/pkg/gui/list_view.go @@ -69,10 +69,11 @@ func (gui *Gui) getListViews() []*listView { getItemsLength: func() int { return gui.getMenuView().LinesHeight() }, getSelectedLineIdxPtr: func() *int { return &gui.State.Panels.Menu.SelectedLine }, handleFocus: gui.handleMenuSelect, + handleItemSelect: gui.handleMenuSelect, // need to add a layer of indirection here because the callback changes during runtime - handleItemSelect: gui.wrappedHandler(func() error { return gui.State.Panels.Menu.OnPress(gui.g, nil) }), - gui: gui, - rendersToMainView: false, + handleClickSelectedItem: gui.wrappedHandler(func() error { return gui.State.Panels.Menu.OnPress(gui.g, nil) }), + gui: gui, + rendersToMainView: false, }, { viewName: "files", |