1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

remove previous view

This commit is contained in:
Jesse Duffield
2020-08-16 17:29:06 +10:00
parent 6fb83b740b
commit c9ae54a8c8
2 changed files with 2 additions and 4 deletions

View File

@ -349,7 +349,7 @@ func (gui *Gui) getFocusLayout() func(g *gocui.Gui) error {
var previousView *gocui.View
return func(g *gocui.Gui) error {
newView := gui.g.CurrentView()
if err := gui.onFocusChange(); err != nil {
if err := gui.onViewFocusChange(); err != nil {
return err
}
// for now we don't consider losing focus to a popup panel as actually losing focus
@ -367,7 +367,7 @@ func (gui *Gui) getFocusLayout() func(g *gocui.Gui) error {
}
}
func (gui *Gui) onFocusChange() error {
func (gui *Gui) onViewFocusChange() error {
currentView := gui.g.CurrentView()
for _, view := range gui.g.Views() {
view.Highlight = view.Name() != "main" && view == currentView