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.
This commit is contained in:
Dmytro Maluka
2024-06-16 13:56:11 +02:00
parent 602acff42f
commit badaba66f3

View File

@@ -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
}