mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-24 05:36:19 +02:00
remove previous view
This commit is contained in:
parent
6fb83b740b
commit
c9ae54a8c8
@ -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
|
||||
|
@ -217,7 +217,6 @@ type guiState struct {
|
||||
RemoteBranches []*commands.RemoteBranch
|
||||
Tags []*commands.Tag
|
||||
MenuItemCount int // can't store the actual list because it's of interface{} type
|
||||
PreviousView string
|
||||
Updating bool
|
||||
Panels *panelStates
|
||||
MainContext string // used to keep the main and secondary views' contexts in sync
|
||||
@ -260,7 +259,6 @@ func (gui *Gui) resetState() {
|
||||
|
||||
gui.State = &guiState{
|
||||
Files: make([]*commands.File, 0),
|
||||
PreviousView: "files",
|
||||
Commits: make([]*commands.Commit, 0),
|
||||
FilteredReflogCommits: make([]*commands.Commit, 0),
|
||||
ReflogCommits: make([]*commands.Commit, 0),
|
||||
|
Loading…
x
Reference in New Issue
Block a user