summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancisco Miamoto <fsmiamoto@gmail.com>2021-12-27 23:18:59 -0300
committerJesse Duffield <jessedduffield@gmail.com>2021-12-28 15:54:19 +1100
commit8a76b5a4ee0a02cdad2fdf41a773ccc7ca504cc2 (patch)
tree9644c9dcc5004d00aa0b0cc5771be334f23be5fb
parent1a7d0cd7aede0a62a39b320071b48c5eda0391c0 (diff)
use custom handler only for branch commits context
-rw-r--r--pkg/gui/list_context_config.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/gui/list_context_config.go b/pkg/gui/list_context_config.go
index ee47c9b33..cd936623c 100644
--- a/pkg/gui/list_context_config.go
+++ b/pkg/gui/list_context_config.go
@@ -401,17 +401,17 @@ func (gui *Gui) getListContextKeyBindings() []*Binding {
{ViewName: listContext.GetViewName(), Tag: "navigation", Contexts: []string{string(listContext.GetKey())}, Key: gui.getKey(keybindingConfig.Universal.PrevPage), Modifier: gocui.ModNone, Handler: listContext.handlePrevPage, Description: gui.Tr.LcPrevPage},
{ViewName: listContext.GetViewName(), Tag: "navigation", Contexts: []string{string(listContext.GetKey())}, Key: gui.getKey(keybindingConfig.Universal.NextPage), Modifier: gocui.ModNone, Handler: listContext.handleNextPage, Description: gui.Tr.LcNextPage},
{ViewName: listContext.GetViewName(), Tag: "navigation", Contexts: []string{string(listContext.GetKey())}, Key: gui.getKey(keybindingConfig.Universal.GotoTop), Modifier: gocui.ModNone, Handler: listContext.handleGotoTop, Description: gui.Tr.LcGotoTop},
- {ViewName: listContext.GetViewName(), Tag: "navigation", Contexts: []string{string(listContext.GetKey())}, Key: gui.getKey(keybindingConfig.Universal.GotoBottom), Modifier: gocui.ModNone, Handler: listContext.handleGotoBottom, Description: gui.Tr.LcGotoBottom},
{ViewName: listContext.GetViewName(), Tag: "navigation", Contexts: []string{string(listContext.GetKey())}, Key: gocui.MouseWheelDown, Modifier: gocui.ModNone, Handler: listContext.handleNextLine},
{ViewName: listContext.GetViewName(), Contexts: []string{string(listContext.GetKey())}, Key: gocui.MouseLeft, Modifier: gocui.ModNone, Handler: listContext.handleClick},
{ViewName: listContext.GetViewName(), Tag: "navigation", Contexts: []string{string(listContext.GetKey())}, Key: gui.getKey(keybindingConfig.Universal.ScrollLeft), Modifier: gocui.ModNone, Handler: listContext.handleScrollLeft},
{ViewName: listContext.GetViewName(), Tag: "navigation", Contexts: []string{string(listContext.GetKey())}, Key: gui.getKey(keybindingConfig.Universal.ScrollRight), Modifier: gocui.ModNone, Handler: listContext.handleScrollRight},
}...)
- // the commits panel needs to lazyload things so it has a couple of its own handlers
openSearchHandler := gui.handleOpenSearch
gotoBottomHandler := listContext.handleGotoBottom
- if listContext.GetViewName() == "commits" {
+
+ // the branch commits context needs to lazyload things so it has a couple of its own handlers
+ if listContext.GetKey() == BRANCH_COMMITS_CONTEXT_KEY {
openSearchHandler = gui.handleOpenSearchForCommitsPanel
gotoBottomHandler = gui.handleGotoBottomForCommitsPanel
}