Conversation
Works for mouse wheel scroll and vim's C-u C-d motions. have yet to work on anchored scroll The current scroll speed is duration based (with hardcoded constant), it should be changed to be speed based with a max time in the future
It made more sense and fixed bugs with autoscroll
Since this function was only called at two places I took this liberty to make it more reliable wether we should use the smooth scrolling or not (with respect to enabled setting) This is necessary to disable smooth scrolling with trackpad because the scrolling is already pixel based in this case
This new implementation directly requires the final ScrollAnchor and top_row and works from that to compute intermediate values With this new implementation the update_animation function directly uses set_anchor(), removing the need of ScrollInstigator altogether These changes were necessary to implement anchored scroll (ones that use set_scroll_anchor) in a later commit There is a bug when clicking on the scrollbar directly that I must fix
|
We require contributors to sign our Contributor License Agreement, and we don't have @hocman2 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
We require contributors to sign our Contributor License Agreement, and we don't have @hocman2 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
We require contributors to sign our Contributor License Agreement, and we don't have @hocman2 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
Thanks for this! Having played with the prototype a little bit, I think we should not ship this. A core goal of Zed is speed; and currently this makes Zed feel much slower. I do know there are reasons we might want to add some kind of animation to scrolling, but if we do, it needs to be done in a way that doesn't get in the way of feeling snappy. |
|
Just wanted to enable smooth scrolling and got into this pull request and issue - a bit disappointed, really. I understand that the goal is speed, but there are people who also would prefer smoothness and better readability. For me it is really harder to focus on specific lines of code during scrolling, my eyes need some time to recognize the text (and it takes about 0.5s for me) - that's how my mind or eyes work, idk? (and I feel some tense in eyes during stuttering scrolling)
Yes, but the smooth scrolling is disabled by default, which won't make Zed feel "much slower" at first glance. If the user wants it - maybe let him do that? |
I agree with you, smooth scrolling helps quite a bit when navigating with keyboard (vim mode) but in this case it makes the scroll wheel navigation quite unresponsive and this might be why it was not merged. |
|
I was searching for a setting to enable smooth scrolling and i feel very disappointed to find this PR Closed. I think implementing this as an option (false by default) is adequate, i wouldn't mind to sacrifice speed to smooth scrolling and id say its preferred that way by many other users who want this feature. |
Closes #4355
I had initially opened a discussion here: #31518
but upon reflexion a pull request seems more explicit
Release Notes: