1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-19 21:28:28 +02:00

stop opening suggestions tab when no suggestions present

This commit is contained in:
Jesse Duffield 2021-10-17 17:49:32 +11:00
parent 305f211615
commit c0cd9dd835

View File

@ -281,7 +281,12 @@ func (gui *Gui) setKeyBindings(opts createPopupPanelOpts) error {
{
viewName: "confirmation",
key: gui.getKey(keybindingConfig.Universal.TogglePanel),
handler: func() error { return gui.replaceContext(gui.State.Contexts.Suggestions) },
handler: func() error {
if len(gui.State.Suggestions) > 0 {
return gui.replaceContext(gui.State.Contexts.Suggestions)
}
return nil
},
},
{
viewName: "suggestions",