mirror of https://github.com/rivo/tview.git
No mouse scrolling when scrolling is turned off.
This commit is contained in:
parent
e4a85fc779
commit
9c17885289
|
@ -1399,10 +1399,16 @@ func (t *TextView) MouseHandler() func(action MouseAction, event *tcell.EventMou
|
||||||
}
|
}
|
||||||
consumed = true
|
consumed = true
|
||||||
case MouseScrollUp:
|
case MouseScrollUp:
|
||||||
|
if !t.scrollable {
|
||||||
|
break
|
||||||
|
}
|
||||||
t.trackEnd = false
|
t.trackEnd = false
|
||||||
t.lineOffset--
|
t.lineOffset--
|
||||||
consumed = true
|
consumed = true
|
||||||
case MouseScrollDown:
|
case MouseScrollDown:
|
||||||
|
if !t.scrollable {
|
||||||
|
break
|
||||||
|
}
|
||||||
t.lineOffset++
|
t.lineOffset++
|
||||||
if len(t.lineIndex)-t.lineOffset < height {
|
if len(t.lineIndex)-t.lineOffset < height {
|
||||||
// If we scroll to the end, turn on tracking.
|
// If we scroll to the end, turn on tracking.
|
||||||
|
|
Loading…
Reference in New Issue