summaryrefslogtreecommitdiffstats
path: root/pkg/gui/gui.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-19 08:26:22 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-23 14:29:18 +1000
commit9a2dc3fe150a03ccb4f086b05d8a8249c9e6c37f (patch)
tree7dd6da3dbf1907a04b1b865973f9dfdfd0ccc10e /pkg/gui/gui.go
parentf0c3d3fc4d43f5b7487540d5c0356f62b3b2997d (diff)
stop crash due to context stack not being initialized
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r--pkg/gui/gui.go10
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()