diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-18 20:43:08 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-18 21:25:52 +1100 |
commit | b6fb7f13657435a789b39eabfc4414d2ec203588 (patch) | |
tree | e06a99517ba4eb032503d55033e88236fad10efe /pkg/gui/patch_building_panel.go | |
parent | dbb8b17d839cea811238f2575474f97176bc90a1 (diff) |
fix integration test
Diffstat (limited to 'pkg/gui/patch_building_panel.go')
-rw-r--r-- | pkg/gui/patch_building_panel.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/gui/patch_building_panel.go b/pkg/gui/patch_building_panel.go index ee1610fb4..bf0c95fa1 100644 --- a/pkg/gui/patch_building_panel.go +++ b/pkg/gui/patch_building_panel.go @@ -62,6 +62,17 @@ func (gui *Gui) handleRefreshPatchBuildingPanel(selectedLineIdx int) error { return gui.refreshPatchBuildingPanel(selectedLineIdx) } +func (gui *Gui) onPatchBuildingFocus(selectedLineIdx int) error { + gui.Mutexes.LineByLinePanelMutex.Lock() + defer gui.Mutexes.LineByLinePanelMutex.Unlock() + + if gui.State.Panels.LineByLine == nil || selectedLineIdx != -1 { + return gui.refreshPatchBuildingPanel(selectedLineIdx) + } + + return nil +} + func (gui *Gui) handleToggleSelectionForPatch() error { err := gui.withLBLActiveCheck(func(state *LblPanelState) error { toggleFunc := gui.Git.Patch.PatchManager.AddFileLineRange |