diff options
-rw-r--r-- | pkg/gui/commit_files_panel.go | 9 | ||||
-rw-r--r-- | pkg/gui/patch_building_panel.go | 4 | ||||
-rw-r--r-- | pkg/gui/patch_options_panel.go | 5 |
3 files changed, 9 insertions, 9 deletions
diff --git a/pkg/gui/commit_files_panel.go b/pkg/gui/commit_files_panel.go index a93486b07..7bb78b4bc 100644 --- a/pkg/gui/commit_files_panel.go +++ b/pkg/gui/commit_files_panel.go @@ -1,7 +1,6 @@ package gui import ( - "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/controllers" ) @@ -54,14 +53,6 @@ func (gui *Gui) SwitchToCommitFilesContext(opts controllers.SwitchToCommitFilesC } func (gui *Gui) refreshCommitFilesContext() error { - currentSideContext := gui.currentSideContext() - if currentSideContext.GetKey() == context.COMMIT_FILES_CONTEXT_KEY || - currentSideContext.GetKey() == context.LOCAL_COMMITS_CONTEXT_KEY { - if err := gui.handleRefreshPatchBuildingPanel(-1); err != nil { - return err - } - } - to := gui.State.Contexts.CommitFiles.GetRefName() from, reverse := gui.State.Modes.Diffing.GetFromAndReverseArgsForDiff(to) diff --git a/pkg/gui/patch_building_panel.go b/pkg/gui/patch_building_panel.go index b2c3c4ab2..f1aea7b55 100644 --- a/pkg/gui/patch_building_panel.go +++ b/pkg/gui/patch_building_panel.go @@ -90,6 +90,10 @@ func (gui *Gui) handleToggleSelectionForPatch() error { return err } + if err := gui.handleRefreshPatchBuildingPanel(-1); err != nil { + return err + } + if err := gui.refreshCommitFilesContext(); err != nil { return err } diff --git a/pkg/gui/patch_options_panel.go b/pkg/gui/patch_options_panel.go index d8ac509ac..c8cfd76d1 100644 --- a/pkg/gui/patch_options_panel.go +++ b/pkg/gui/patch_options_panel.go @@ -201,5 +201,10 @@ func (gui *Gui) handleResetPatch() error { return err } } + + if err := gui.handleEscapePatchBuildingPanel(); err != nil { + return err + } + return gui.refreshCommitFilesContext() } |