summaryrefslogtreecommitdiffstats
path: root/pkg/gui/diffing.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-23 10:17:17 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-23 14:29:18 +1000
commit4198bbae6cc3747ee45d47648acab2b91f121272 (patch)
tree67081497955b0eda5c37ac28afc8ec7f8ee22d30 /pkg/gui/diffing.go
parentade54b38c12079ba133e9c8810af2a3760afb0f3 (diff)
ensure there is always a current context
Diffstat (limited to 'pkg/gui/diffing.go')
-rw-r--r--pkg/gui/diffing.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/gui/diffing.go b/pkg/gui/diffing.go
index 1da230a0d..c3cc40fa0 100644
--- a/pkg/gui/diffing.go
+++ b/pkg/gui/diffing.go
@@ -31,7 +31,7 @@ func (gui *Gui) renderDiff() error {
// which becomes an option when you bring up the diff menu, but when you're just
// flicking through branches it will be using the local branch name.
func (gui *Gui) currentDiffTerminals() []string {
- switch gui.currentContextKey() {
+ switch gui.currentContext().GetKey() {
case "":
return nil
case FILES_CONTEXT_KEY:
@@ -71,7 +71,7 @@ func (gui *Gui) currentDiffTerminal() string {
}
func (gui *Gui) currentlySelectedFilename() string {
- switch gui.currentContextKey() {
+ switch gui.currentContext().GetKey() {
case FILES_CONTEXT_KEY, COMMIT_FILES_CONTEXT_KEY:
return gui.getSideContextSelectedItemId()
default: