1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-07 22:02:56 +03:00

Merge branch 'hotfix/273-cursor-scrolling' of https://github.com/jesseduffield/lazygit into hotfix/273-cursor-scrolling

This commit is contained in:
Jesse Duffield
2018-09-22 13:50:01 +10:00
4 changed files with 57 additions and 1 deletions

View File

@@ -133,8 +133,15 @@ func (gui *Gui) switchFocus(g *gocui.Gui, oldView, newView *gocui.View) error {
},
)
gui.Log.Info(message)
gui.State.PreviousView = oldView.Name()
// second class panels should never have focus restored to them because
// once they lose focus they are effectively 'destroyed'
secondClassPanels := []string{"confirmation", "menu"}
if !utils.IncludesString(secondClassPanels, oldView.Name()) {
gui.State.PreviousView = oldView.Name()
}
}
newView.Highlight = true
message := gui.Tr.TemplateLocalize(
"newFocusedViewIs",