-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the scrollbar postiton on scrollToMark
#13291
Conversation
When I moved this into ControlCore, I forgot that UserScrollViewport is usually triggered by the scrollbar updating, so it doesn't ask the UI to update. Since this logic is in ControlCore, it's sorta in a weird place where it needs to communicate both up and down: * update the `Terminal`'s viewport position * update the `TermControl`'s scrollbar position * [x] Closes a bug bash bug
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: Carlos Zamora <[email protected]>
Why doesn't |
That's maybe an artifact of an older day. In the past there were definitely some weird feedback loops you could get into if you triggered a scrollbar update, from a scrollbar update, if that makes sense. So we separated out the scrolling actions - one for viewport updates that were initiated by the terminal itself (e.g. emitting newlines), and another for updates that were initiated by the user scrolling the viewport (e.g. with the scrollbar). These were This particular one is a weird case. This is basically a user initiated scroll, so typically those happen by updating the scrollbar itself, in |
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
When I moved this into ControlCore, I forgot that UserScrollViewport is usually triggered by the scrollbar updating, so it doesn't ask the UI to update. Since this logic is in ControlCore, it's sorta in a weird place where it needs to communicate both up and down:
Terminal
's viewport positionTermControl
's scrollbar positionChecklist: