[GH-ISSUE #945] Set TextView.trackEnd to true when "MouseScrollDown" reaches the bottom of the textview #691

Closed
opened 2026-03-04 01:07:04 +03:00 by kerem · 1 comment
Owner

Originally created by @iopotato on GitHub (Feb 6, 2024).
Original GitHub issue: https://github.com/rivo/tview/issues/945

In addition to what the title says, it would be nice if func (t *TextView) ScrollTo(row, column int) *TextView also sets trackEnd to true whenever the scroll reaches the bottom of the textview.

I tried to implement this behaviour but I could not find a way to detect whether the scroll has reached the bottom of the textview.

By the way, thanks a lot for creating and maintaining this amazing project!

Originally created by @iopotato on GitHub (Feb 6, 2024). Original GitHub issue: https://github.com/rivo/tview/issues/945 In addition to what the title says, it would be nice if `func (t *TextView) ScrollTo(row, column int) *TextView` also sets trackEnd to true whenever the scroll reaches the bottom of the textview. I tried to implement this behaviour but I could not find a way to detect whether the scroll has reached the bottom of the textview. By the way, thanks a lot for creating and maintaining this amazing project!
kerem closed this issue 2026-03-04 01:07:04 +03:00
Author
Owner

@rivo commented on GitHub (Mar 7, 2024):

With the latest commit, tracking is turned on automatically when scrolling to the end with the mouse.

ScrollTo will not have such a functionality. I think the expectation is that calling this function will result in a specific part of the text being shown. If we turned on trackEnd and we had scrolled to the end, it would immediately disappear again and that's not what we want. In fact, I'm explicitly turning trackEnd off in that function so it remains wherever it is. Users can call ScrollToEnd if they want tracking to be on.

<!-- gh-comment-id:1984047385 --> @rivo commented on GitHub (Mar 7, 2024): With the latest commit, tracking is turned on automatically when scrolling to the end with the mouse. `ScrollTo` will not have such a functionality. I think the expectation is that calling this function will result in a specific part of the text being shown. If we turned on `trackEnd` and we had scrolled to the end, it would immediately disappear again and that's not what we want. In fact, I'm explicitly turning `trackEnd` off in that function so it remains wherever it is. Users can call `ScrollToEnd` if they want tracking to be on.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#691
No description provided.