diff --git a/textview.go b/textview.go index e5c8846..743bd6d 100644 --- a/textview.go +++ b/textview.go @@ -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.