summaryrefslogtreecommitdiffstats
path: root/pkg/gui/list_context_config.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-01-28 20:44:36 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-17 19:13:40 +1100
commita90b6efded49abcfa2516db794d7875b0396f558 (patch)
treead9c3738830437064ada223f0978dab1d726b479 /pkg/gui/list_context_config.go
parentfa8571e1f4c349e401542285ea238acdbd9d17ec (diff)
start refactoring gui
Diffstat (limited to 'pkg/gui/list_context_config.go')
-rw-r--r--pkg/gui/list_context_config.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/gui/list_context_config.go b/pkg/gui/list_context_config.go
index 7ddd56e25..c40cade2c 100644
--- a/pkg/gui/list_context_config.go
+++ b/pkg/gui/list_context_config.go
@@ -7,6 +7,7 @@ import (
"github.com/jesseduffield/lazygit/pkg/commands/git_commands"
"github.com/jesseduffield/lazygit/pkg/gui/presentation"
"github.com/jesseduffield/lazygit/pkg/gui/style"
+ "github.com/jesseduffield/lazygit/pkg/gui/types"
)
func (gui *Gui) menuListContext() IListContext {
@@ -391,15 +392,15 @@ func (gui *Gui) getListContexts() []IListContext {
}
}
-func (gui *Gui) getListContextKeyBindings() []*Binding {
- bindings := make([]*Binding, 0)
+func (gui *Gui) getListContextKeyBindings() []*types.Binding {
+ bindings := make([]*types.Binding, 0)
keybindingConfig := gui.UserConfig.Keybinding
for _, listContext := range gui.getListContexts() {
listContext := listContext
- bindings = append(bindings, []*Binding{
+ bindings = append(bindings, []*types.Binding{
{ViewName: listContext.GetViewName(), Tag: "navigation", Contexts: []string{string(listContext.GetKey())}, Key: gui.getKey(keybindingConfig.Universal.PrevItemAlt), Modifier: gocui.ModNone, Handler: listContext.handlePrevLine},
{ViewName: listContext.GetViewName(), Tag: "navigation", Contexts: []string{string(listContext.GetKey())}, Key: gui.getKey(keybindingConfig.Universal.PrevItem), Modifier: gocui.ModNone, Handler: listContext.handlePrevLine},
{ViewName: listContext.GetViewName(), Tag: "navigation", Contexts: []string{string(listContext.GetKey())}, Key: gocui.MouseWheelUp, Modifier: gocui.ModNone, Handler: listContext.handlePrevLine},
@@ -423,7 +424,7 @@ func (gui *Gui) getListContextKeyBindings() []*Binding {
gotoBottomHandler = gui.handleGotoBottomForCommitsPanel
}
- bindings = append(bindings, []*Binding{
+ bindings = append(bindings, []*types.Binding{
{
ViewName: listContext.GetViewName(),
Contexts: []string{string(listContext.GetKey())},