From badaba66f3f1dea9942b43cdbc316fee30f34cb4 Mon Sep 17 00:00:00 2001 From: Dmytro Maluka Date: Sun, 16 Jun 2024 13:56:11 +0200 Subject: [PATCH] Fix non-working mouse wheel scrolling on the top line of the screen Scroll the tab bar only if there actually is the tab bar, otherwise propagate the mouse wheel event to the bufpane. --- internal/action/tab.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/action/tab.go b/internal/action/tab.go index 9c6bd01e..b70e349f 100644 --- a/internal/action/tab.go +++ b/internal/action/tab.go @@ -132,12 +132,12 @@ func (t *TabList) HandleEvent(event tcell.Event) { return } case tcell.WheelUp: - if my == t.Y { + if my == t.Y && len(t.List) > 1 { t.Scroll(4) return } case tcell.WheelDown: - if my == t.Y { + if my == t.Y && len(t.List) > 1 { t.Scroll(-4) return }