mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-23 00:39:13 +02:00
stop opening suggestions tab when no suggestions present
This commit is contained in:
@ -281,7 +281,12 @@ func (gui *Gui) setKeyBindings(opts createPopupPanelOpts) error {
|
|||||||
{
|
{
|
||||||
viewName: "confirmation",
|
viewName: "confirmation",
|
||||||
key: gui.getKey(keybindingConfig.Universal.TogglePanel),
|
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",
|
viewName: "suggestions",
|
||||||
|
Reference in New Issue
Block a user