summaryrefslogtreecommitdiffstats
path: root/pkg/gui/view_helpers.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-11-10 16:33:31 +1100
committerJesse Duffield <jessedduffield@gmail.com>2019-11-10 22:32:13 +1100
commit131113b0657eea84f842e2c1e24d0ab1150505e5 (patch)
treef22c3e0db6ff43655a87bd30aac6f5406ecfab78 /pkg/gui/view_helpers.go
parente85310c0a92a89167530241bdc3fc5f66a48706d (diff)
simplify how the context system works
Diffstat (limited to 'pkg/gui/view_helpers.go')
-rw-r--r--pkg/gui/view_helpers.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go
index 29180418c..ec1b3f647 100644
--- a/pkg/gui/view_helpers.go
+++ b/pkg/gui/view_helpers.go
@@ -117,7 +117,7 @@ func (gui *Gui) newLineFocused(g *gocui.Gui, v *gocui.View) error {
case "credentials":
return gui.handleCredentialsViewFocused(g, v)
case "main":
- if gui.State.Contexts["main"] == "merging" {
+ if gui.State.Context == "merging" {
return gui.refreshMergePanel()
}
v.Highlight = false
@@ -406,7 +406,7 @@ func (gui *Gui) renderPanelOptions() error {
case "menu":
return gui.renderMenuOptions()
case "main":
- if gui.State.Contexts["main"] == "merging" {
+ if gui.State.Context == "merging" {
return gui.renderMergeOptions()
}
}