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
|
||||
case MouseScrollUp:
|
||||
if !t.scrollable {
|
||||
break
|
||||
}
|
||||
t.trackEnd = false
|
||||
t.lineOffset--
|
||||
consumed = true
|
||||
case MouseScrollDown:
|
||||
if !t.scrollable {
|
||||
break
|
||||
}
|
||||
t.lineOffset++
|
||||
if len(t.lineIndex)-t.lineOffset < height {
|
||||
// If we scroll to the end, turn on tracking.
|
||||
|
|
Loading…
Reference in New Issue