diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-07-18 19:41:13 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-07-18 20:00:48 +1000 |
commit | 845c80721f8f0445b0abe39ee381a6feecf158a2 (patch) | |
tree | a2cfbd2c2710db01c95e3354923f831959da42d2 /pkg/gui/menu_panel.go | |
parent | 0e65db10d85304c2ab8418e5219c267277a9c886 (diff) |
Decouple escaping from quittingv0.20.10
When a user is not entering text into a prompt, the 'q' key should immediately
quit the application. On the other hand, the 'esc' key should cancel/close/go-back
to the previous context.
If we're at the surface level (nothing to cancel/close) and the user hits the
escape key, the default behaviour is to close the app, however we now have a
`quitOnTopLevelReturn` config key to override this.
I actually think from the beginning we should have made this config option
default to false rather than true which is the default this PR gives it,
but I don't want to anger too many people familiar with the existing behaviour.
Diffstat (limited to 'pkg/gui/menu_panel.go')
-rw-r--r-- | pkg/gui/menu_panel.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/gui/menu_panel.go b/pkg/gui/menu_panel.go index ac0844216..9b2eefac5 100644 --- a/pkg/gui/menu_panel.go +++ b/pkg/gui/menu_panel.go @@ -25,7 +25,7 @@ func (gui *Gui) handleMenuSelect(g *gocui.Gui, v *gocui.View) error { func (gui *Gui) renderMenuOptions() error { optionsMap := map[string]string{ - fmt.Sprintf("%s/%s", gui.getKeyDisplay("universal.return"), gui.getKeyDisplay("universal.quit")): gui.Tr.SLocalize("close"), + gui.getKeyDisplay("universal.return"): gui.Tr.SLocalize("close"), fmt.Sprintf("%s %s", gui.getKeyDisplay("universal.prevItem"), gui.getKeyDisplay("universal.nextItem")): gui.Tr.SLocalize("navigate"), gui.getKeyDisplay("universal.select"): gui.Tr.SLocalize("execute"), } |