mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-23 12:18:51 +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
|
var previousView *gocui.View
|
||||||
return func(g *gocui.Gui) error {
|
return func(g *gocui.Gui) error {
|
||||||
newView := gui.g.CurrentView()
|
newView := gui.g.CurrentView()
|
||||||
if err := gui.onFocusChange(); err != nil {
|
if err := gui.onViewFocusChange(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// for now we don't consider losing focus to a popup panel as actually losing focus
|
// 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()
|
currentView := gui.g.CurrentView()
|
||||||
for _, view := range gui.g.Views() {
|
for _, view := range gui.g.Views() {
|
||||||
view.Highlight = view.Name() != "main" && view == currentView
|
view.Highlight = view.Name() != "main" && view == currentView
|
||||||
|
@ -217,7 +217,6 @@ type guiState struct {
|
|||||||
RemoteBranches []*commands.RemoteBranch
|
RemoteBranches []*commands.RemoteBranch
|
||||||
Tags []*commands.Tag
|
Tags []*commands.Tag
|
||||||
MenuItemCount int // can't store the actual list because it's of interface{} type
|
MenuItemCount int // can't store the actual list because it's of interface{} type
|
||||||
PreviousView string
|
|
||||||
Updating bool
|
Updating bool
|
||||||
Panels *panelStates
|
Panels *panelStates
|
||||||
MainContext string // used to keep the main and secondary views' contexts in sync
|
MainContext string // used to keep the main and secondary views' contexts in sync
|
||||||
@ -260,7 +259,6 @@ func (gui *Gui) resetState() {
|
|||||||
|
|
||||||
gui.State = &guiState{
|
gui.State = &guiState{
|
||||||
Files: make([]*commands.File, 0),
|
Files: make([]*commands.File, 0),
|
||||||
PreviousView: "files",
|
|
||||||
Commits: make([]*commands.Commit, 0),
|
Commits: make([]*commands.Commit, 0),
|
||||||
FilteredReflogCommits: make([]*commands.Commit, 0),
|
FilteredReflogCommits: make([]*commands.Commit, 0),
|
||||||
ReflogCommits: make([]*commands.Commit, 0),
|
ReflogCommits: make([]*commands.Commit, 0),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user