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/patch_options_panel.go | |
parent | 138be04e6575f2bd087630e49d122af578c78bf6 (diff) |
move context keys into context package
Diffstat (limited to 'pkg/gui/patch_options_panel.go')
-rw-r--r-- | pkg/gui/patch_options_panel.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/gui/patch_options_panel.go b/pkg/gui/patch_options_panel.go index 8f8615e4a..e28e7b26d 100644 --- a/pkg/gui/patch_options_panel.go +++ b/pkg/gui/patch_options_panel.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/jesseduffield/lazygit/pkg/commands/types/enums" + "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/types" ) @@ -82,7 +83,7 @@ func (gui *Gui) validateNormalWorkingTreeState() (bool, error) { } func (gui *Gui) returnFocusFromLineByLinePanelIfNecessary() error { - if gui.State.MainContext == MAIN_PATCH_BUILDING_CONTEXT_KEY { + if gui.State.MainContext == context.MAIN_PATCH_BUILDING_CONTEXT_KEY { return gui.handleEscapePatchBuildingPanel() } return nil @@ -188,7 +189,7 @@ func (gui *Gui) handleApplyPatch(reverse bool) error { func (gui *Gui) handleResetPatch() error { gui.git.Patch.PatchManager.Reset() - if gui.currentContextKeyIgnoringPopups() == MAIN_PATCH_BUILDING_CONTEXT_KEY { + if gui.currentContextKeyIgnoringPopups() == context.MAIN_PATCH_BUILDING_CONTEXT_KEY { if err := gui.c.PushContext(gui.State.Contexts.CommitFiles); err != nil { return err } |