summaryrefslogtreecommitdiffstats
path: root/pkg/gui/staging_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-01-18 20:43:08 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-01-18 21:25:52 +1100
commitb6fb7f13657435a789b39eabfc4414d2ec203588 (patch)
treee06a99517ba4eb032503d55033e88236fad10efe /pkg/gui/staging_panel.go
parentdbb8b17d839cea811238f2575474f97176bc90a1 (diff)
fix integration test
Diffstat (limited to 'pkg/gui/staging_panel.go')
-rw-r--r--pkg/gui/staging_panel.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/gui/staging_panel.go b/pkg/gui/staging_panel.go
index f4409d76c..ecb208dcc 100644
--- a/pkg/gui/staging_panel.go
+++ b/pkg/gui/staging_panel.go
@@ -74,6 +74,17 @@ func (gui *Gui) handleRefreshStagingPanel(forceSecondaryFocused bool, selectedLi
return gui.refreshStagingPanel(forceSecondaryFocused, selectedLineIdx)
}
+func (gui *Gui) onStagingFocus(forceSecondaryFocused bool, selectedLineIdx int) error {
+ gui.Mutexes.LineByLinePanelMutex.Lock()
+ defer gui.Mutexes.LineByLinePanelMutex.Unlock()
+
+ if gui.State.Panels.LineByLine == nil || selectedLineIdx != -1 {
+ return gui.refreshStagingPanel(forceSecondaryFocused, selectedLineIdx)
+ }
+
+ return nil
+}
+
func (gui *Gui) handleTogglePanel() error {
return gui.withLBLActiveCheck(func(state *LblPanelState) error {
state.SecondaryFocused = !state.SecondaryFocused