diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-03-24 19:13:00 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-24 19:13:00 +1100 |
commit | 4780953cef543bf506d3dc68547280dae2d1481b (patch) | |
tree | 21211912fb3919f6ece2c6b27f3927028376e939 /pkg/gui/gui.go | |
parent | 11bc8b87faeba22b7afac550207cf54a66801641 (diff) | |
parent | b7c61aa883a5eddc2db6147cff9d13341b0936a8 (diff) |
Merge pull request #2377 from shinhs0506/clear-staging-after-commit
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index a88134639..69ff10c77 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -63,9 +63,9 @@ type ContextManager struct { sync.RWMutex } -func NewContextManager(initialContext types.Context) ContextManager { +func NewContextManager() ContextManager { return ContextManager{ - ContextStack: []types.Context{initialContext}, + ContextStack: []types.Context{}, RWMutex: sync.RWMutex{}, } } @@ -298,11 +298,15 @@ func (gui *Gui) resetState(startArgs appTypes.StartArgs, reuseState bool) { }, ScreenMode: initialScreenMode, // TODO: put contexts in the context manager - ContextManager: NewContextManager(initialContext), + ContextManager: NewContextManager(), Contexts: contextTree, WindowViewNameMap: initialWindowViewNameMap, } + if err := gui.c.PushContext(initialContext); err != nil { + gui.c.Log.Error(err) + } + gui.RepoStateMap[Repo(currentDir)] = gui.State } |