From 628404e1143b04840f10d62f263ac0edc17ae2a7 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 23 Aug 2020 09:36:45 +1000 Subject: [PATCH] use actual keys --- pkg/gui/line_by_line_panel.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/gui/line_by_line_panel.go b/pkg/gui/line_by_line_panel.go index a790b5a54..51adde48a 100644 --- a/pkg/gui/line_by_line_panel.go +++ b/pkg/gui/line_by_line_panel.go @@ -336,9 +336,9 @@ func (gui *Gui) handleOpenFileAtLine() error { // again, would be good to use inheritance here (or maybe even composition) var filename string switch gui.State.MainContext { - case "patchBuilding": + case gui.Contexts.PatchBuilding.Context.GetKey(): filename = gui.getSelectedCommitFileName() - case "staging": + case gui.Contexts.Staging.Context.GetKey(): file := gui.getSelectedFile() if file == nil { return nil