mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[GH-ISSUE #945] Set TextView.trackEnd to true when "MouseScrollDown" reaches the bottom of the textview #691
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#691
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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) *TextViewalso 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!
@rivo commented on GitHub (Mar 7, 2024):
With the latest commit, tracking is turned on automatically when scrolling to the end with the mouse.
ScrollTowill 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 ontrackEndand we had scrolled to the end, it would immediately disappear again and that's not what we want. In fact, I'm explicitly turningtrackEndoff in that function so it remains wherever it is. Users can callScrollToEndif they want tracking to be on.