Skip to content

Commit badaba6

Browse files
committed
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.
1 parent 602acff commit badaba6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/action/tab.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ func (t *TabList) HandleEvent(event tcell.Event) {
132132
return
133133
}
134134
case tcell.WheelUp:
135-
if my == t.Y {
135+
if my == t.Y && len(t.List) > 1 {
136136
t.Scroll(4)
137137
return
138138
}
139139
case tcell.WheelDown:
140-
if my == t.Y {
140+
if my == t.Y && len(t.List) > 1 {
141141
t.Scroll(-4)
142142
return
143143
}

0 commit comments

Comments
 (0)