diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-02 14:33:20 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-06 19:34:32 +1000 |
commit | 3ea5e4d4b2b0fa3f555a1562acce5fb729b6ca02 (patch) | |
tree | 51498d4a92a5ba0844e256ca788483592150502f /pkg/gui/keybindings.go | |
parent | 5f77ac8d6f1b1de0af59ca839f2773f34f441c4d (diff) |
allow scrolling when staging lines or building patch
Diffstat (limited to 'pkg/gui/keybindings.go')
-rw-r--r-- | pkg/gui/keybindings.go | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index d5e7154da..272d63a88 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -229,14 +229,14 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { { ViewName: "", Key: gui.getKey(config.Universal.ScrollUpMain), - Handler: gui.scrollUpMain, + Handler: gui.wrappedHandler(gui.scrollUpMain), Alternative: "fn+up", Description: gui.Tr.LcScrollUpMainPanel, }, { ViewName: "", Key: gui.getKey(config.Universal.ScrollDownMain), - Handler: gui.scrollDownMain, + Handler: gui.wrappedHandler(gui.scrollDownMain), Alternative: "fn+down", Description: gui.Tr.LcScrollDownMainPanel, }, @@ -244,25 +244,25 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { ViewName: "", Key: gui.getKey(config.Universal.ScrollUpMainAlt1), Modifier: gocui.ModNone, - Handler: gui.scrollUpMain, + Handler: gui.wrappedHandler(gui.scrollUpMain), }, { ViewName: "", Key: gui.getKey(config.Universal.ScrollDownMainAlt1), Modifier: gocui.ModNone, - Handler: gui.scrollDownMain, + Handler: gui.wrappedHandler(gui.scrollDownMain), }, { ViewName: "", Key: gui.getKey(config.Universal.ScrollUpMainAlt2), Modifier: gocui.ModNone, - Handler: gui.scrollUpMain, + Handler: gui.wrappedHandler(gui.scrollUpMain), }, { ViewName: "", Key: gui.getKey(config.Universal.ScrollDownMainAlt2), Modifier: gocui.ModNone, - Handler: gui.scrollDownMain, + Handler: gui.wrappedHandler(gui.scrollDownMain), }, { ViewName: "", @@ -1125,7 +1125,7 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { ViewName: "main", Contexts: []string{MAIN_NORMAL_CONTEXT_KEY}, Key: gocui.MouseWheelDown, - Handler: gui.scrollDownMain, + Handler: gui.wrappedHandler(gui.scrollDownMain), Description: gui.Tr.ScrollDown, Alternative: "fn+up", }, @@ -1133,7 +1133,7 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { ViewName: "main", Contexts: []string{MAIN_NORMAL_CONTEXT_KEY}, Key: gocui.MouseWheelUp, - Handler: gui.scrollUpMain, + Handler: gui.wrappedHandler(gui.scrollUpMain), Description: gui.Tr.ScrollUp, Alternative: "fn+down", }, @@ -1226,14 +1226,14 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { Contexts: []string{MAIN_PATCH_BUILDING_CONTEXT_KEY, MAIN_STAGING_CONTEXT_KEY}, Key: gocui.MouseWheelUp, Modifier: gocui.ModNone, - Handler: gui.wrappedHandler(gui.handleSelectPrevLine), + Handler: gui.wrappedHandler(gui.scrollUpMain), }, { ViewName: "main", Contexts: []string{MAIN_PATCH_BUILDING_CONTEXT_KEY, MAIN_STAGING_CONTEXT_KEY}, Key: gocui.MouseWheelDown, Modifier: gocui.ModNone, - Handler: gui.wrappedHandler(gui.handleSelectNextLine), + Handler: gui.wrappedHandler(gui.scrollDownMain), }, { ViewName: "main", @@ -1369,14 +1369,14 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { Contexts: []string{MAIN_PATCH_BUILDING_CONTEXT_KEY, MAIN_STAGING_CONTEXT_KEY}, Key: gocui.MouseWheelUp, Modifier: gocui.ModNone, - Handler: gui.handleMouseScrollUp, + Handler: gui.wrappedHandler(gui.scrollUpMain), }, { ViewName: "main", Contexts: []string{MAIN_PATCH_BUILDING_CONTEXT_KEY, MAIN_STAGING_CONTEXT_KEY}, Key: gocui.MouseWheelDown, Modifier: gocui.ModNone, - Handler: gui.handleMouseScrollDown, + Handler: gui.wrappedHandler(gui.scrollDownMain), }, { ViewName: "main", |