Skip to content

Commit 8ad2637

Browse files
committed
Allow scrolling background views with the mouse wheel when a popup is showing
I see little reason to suppress this; the check was really only for click events, not wheel events.
1 parent f6c20f2 commit 8ad2637

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/gui/keybindings.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,8 @@ func (gui *Gui) SetKeybinding(binding *types.Binding) error {
504504
func (gui *Gui) SetMouseKeybinding(binding *gocui.ViewMouseBinding) error {
505505
baseHandler := binding.Handler
506506
newHandler := func(opts gocui.ViewMouseBindingOpts) error {
507-
if gui.helpers.Confirmation.IsPopupPanelFocused() && gui.currentViewName() != binding.ViewName {
507+
if gui.helpers.Confirmation.IsPopupPanelFocused() && gui.currentViewName() != binding.ViewName &&
508+
!gocui.IsMouseScrollKey(opts.Key) {
508509
// we ignore click events on views that aren't popup panels, when a popup panel is focused.
509510
// Unless both the current view and the clicked-on view are either commit message or commit
510511
// description, because we want to allow switching between those two views by clicking.

0 commit comments

Comments
 (0)