diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-19 08:26:22 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 9a2dc3fe150a03ccb4f086b05d8a8249c9e6c37f (patch) | |
tree | 7dd6da3dbf1907a04b1b865973f9dfdfd0ccc10e /pkg/gui/gui.go | |
parent | f0c3d3fc4d43f5b7487540d5c0356f62b3b2997d (diff) |
stop crash due to context stack not being initialized
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 1c0178fe8..cc083b4de 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -282,10 +282,11 @@ func (gui *Gui) resetState() { EditHistory: stack.New(), }, }, - SideView: nil, - Ptmx: nil, - FilterPath: prevFilterPath, - Diff: prevDiff, + SideView: nil, + Ptmx: nil, + FilterPath: prevFilterPath, + Diff: prevDiff, + ViewContextMap: gui.initialViewContextMap(), } } @@ -306,6 +307,7 @@ func NewGui(log *logrus.Entry, gitCommand *commands.GitCommand, oSCommand *comma gui.resetState() gui.State.FilterPath = filterPath + gui.Contexts = gui.contextTree() gui.watchFilesForChanges() |