summaryrefslogtreecommitdiffstats
path: root/pkg/gui/cherry_picking.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/cherry_picking.go
parent4197921465a6cb67d5fdd5b63de653493a5ebd41 (diff)
test
type safe view access
Diffstat (limited to 'pkg/gui/cherry_picking.go')
-rw-r--r--pkg/gui/cherry_picking.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/gui/cherry_picking.go b/pkg/gui/cherry_picking.go
index a9620896a..3ad52a73c 100644
--- a/pkg/gui/cherry_picking.go
+++ b/pkg/gui/cherry_picking.go
@@ -24,7 +24,7 @@ func (gui *Gui) handleCopyCommit() error {
}
// get currently selected commit, add the sha to state.
- context := gui.currentSideContext()
+ context := gui.currentSideListContext()
if context == nil {
return nil
}
@@ -63,7 +63,7 @@ func (gui *Gui) cherryPickedCommitShaMap() map[string]bool {
}
func (gui *Gui) commitsListForContext() []*models.Commit {
- context := gui.currentSideContext()
+ context := gui.currentSideListContext()
if context == nil {
return nil
}
@@ -104,7 +104,7 @@ func (gui *Gui) handleCopyCommitRange() error {
}
// get currently selected commit, add the sha to state.
- context := gui.currentSideContext()
+ context := gui.currentSideListContext()
if context == nil {
return nil
}
@@ -169,7 +169,7 @@ func (gui *Gui) exitCherryPickingMode() error {
return gui.rerenderContextViewIfPresent(contextKey)
}
-func (gui *Gui) rerenderContextViewIfPresent(contextKey string) error {
+func (gui *Gui) rerenderContextViewIfPresent(contextKey ContextKey) error {
if contextKey == "" {
return nil
}
@@ -184,7 +184,7 @@ func (gui *Gui) rerenderContextViewIfPresent(contextKey string) error {
return nil
}
- if view.Context == contextKey {
+ if ContextKey(view.Context) == contextKey {
if err := context.HandleRender(); err != nil {
return err
}