do not refresh patch panel unless commit files panel is the current side panel

This commit is contained in:
Jesse Duffield 2021-04-06 14:21:17 +10:00
parent 12ca922a41
commit fbab5bd444
3 changed files with 32 additions and 14 deletions

View file

@ -94,8 +94,10 @@ func (gui *Gui) handleDiscardOldFileChange() error {
}
func (gui *Gui) refreshCommitFilesView() error {
if err := gui.handleRefreshPatchBuildingPanel(-1); err != nil {
return err
if gui.currentSideContext().GetKey() == COMMIT_FILES_CONTEXT_KEY {
if err := gui.handleRefreshPatchBuildingPanel(-1); err != nil {
return err
}
}
to := gui.State.Panels.CommitFiles.refName