summaryrefslogtreecommitdiffstats
path: root/pkg/gui/staging_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-04-04 23:51:59 +1000
committerJesse Duffield <jessedduffield@gmail.com>2021-04-06 19:34:32 +1000
commit4fe512ff3a299102c2bd78bc83b8644582127aae (patch)
tree5a34eacc1c137a8c98624ba29b757c0a717cf694 /pkg/gui/staging_panel.go
parent4197921465a6cb67d5fdd5b63de653493a5ebd41 (diff)
test
type safe view access
Diffstat (limited to 'pkg/gui/staging_panel.go')
-rw-r--r--pkg/gui/staging_panel.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/gui/staging_panel.go b/pkg/gui/staging_panel.go
index f8c65627c..af50d1c2a 100644
--- a/pkg/gui/staging_panel.go
+++ b/pkg/gui/staging_panel.go
@@ -26,11 +26,11 @@ func (gui *Gui) refreshStagingPanel(forceSecondaryFocused bool, selectedLineIdx
}
if secondaryFocused {
- gui.getMainView().Title = gui.Tr.StagedChanges
- gui.getSecondaryView().Title = gui.Tr.UnstagedChanges
+ gui.Views.Main.Title = gui.Tr.StagedChanges
+ gui.Views.Secondary.Title = gui.Tr.UnstagedChanges
} else {
- gui.getMainView().Title = gui.Tr.UnstagedChanges
- gui.getSecondaryView().Title = gui.Tr.StagedChanges
+ gui.Views.Main.Title = gui.Tr.UnstagedChanges
+ gui.Views.Secondary.Title = gui.Tr.StagedChanges
}
// note for custom diffs, we'll need to send a flag here saying not to use the custom diff
@@ -63,7 +63,7 @@ func (gui *Gui) handleTogglePanelClick() error {
return gui.withLBLActiveCheck(func(state *lBlPanelState) error {
state.SecondaryFocused = !state.SecondaryFocused
- return gui.refreshStagingPanel(false, gui.getSecondaryView().SelectedLineIdx(), state)
+ return gui.refreshStagingPanel(false, gui.Views.Secondary.SelectedLineIdx(), state)
})
}