diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-29 19:15:46 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-17 19:13:40 +1100 |
commit | e363606fb6eeff130e38466f5a63a3a8c0e6ec0d (patch) | |
tree | 3af2946729ffc2e718daaa54f1338614be832251 /pkg/gui/diffing.go | |
parent | 138be04e6575f2bd087630e49d122af578c78bf6 (diff) |
move context keys into context package
Diffstat (limited to 'pkg/gui/diffing.go')
-rw-r--r-- | pkg/gui/diffing.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/gui/diffing.go b/pkg/gui/diffing.go index 0448e3147..3977e6b45 100644 --- a/pkg/gui/diffing.go +++ b/pkg/gui/diffing.go @@ -4,6 +4,7 @@ import ( "fmt" "strings" + "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/modes/diffing" "github.com/jesseduffield/lazygit/pkg/gui/types" ) @@ -35,12 +36,12 @@ func (gui *Gui) currentDiffTerminals() []string { switch gui.currentContext().GetKey() { case "": return nil - case FILES_CONTEXT_KEY, SUBMODULES_CONTEXT_KEY: + case context.FILES_CONTEXT_KEY, context.SUBMODULES_CONTEXT_KEY: // TODO: should we just return nil here? return []string{""} - case COMMIT_FILES_CONTEXT_KEY: + case context.COMMIT_FILES_CONTEXT_KEY: return []string{gui.State.Panels.CommitFiles.refName} - case LOCAL_BRANCHES_CONTEXT_KEY: + case context.LOCAL_BRANCHES_CONTEXT_KEY: // for our local branches we want to include both the branch and its upstream branch := gui.getSelectedBranch() if branch != nil { @@ -74,7 +75,7 @@ func (gui *Gui) currentDiffTerminal() string { func (gui *Gui) currentlySelectedFilename() string { switch gui.currentContext().GetKey() { - case FILES_CONTEXT_KEY, COMMIT_FILES_CONTEXT_KEY: + case context.FILES_CONTEXT_KEY, context.COMMIT_FILES_CONTEXT_KEY: return gui.getSideContextSelectedItemId() default: return "" |