3 ms·
Very interesting. I expected smooth scroll in VSCode to do like the video does. But no, it does not affect single-line scrolling. It affects scrolling a page
by hibbelig 3y ago
Very interesting. I expected smooth scroll in VSCode to do like the video does. But no, it does not affect single-line scrolling. It affects scrolling a page!
For Firefox, smooth scrolling behaves exactly as I expect, but it affects scrolling via the cursor keys only (and the space bar), not via the mouse/trackpad. Also, the animation is quite fast, so it's easy to miss. (In Firefox, scrolling via the trackpad is always smooth; I haven't used a mouse with a whell in ages, so I don't know how that behaves.)
- aragonite 3y ago> Very interesting. I expected smooth scroll in VSCode to do like the video does. But no, it does not affect single-line scrolling. It affects scrolling a page! > For Firefox, smooth scrolling behaves exactly as I expect, but it affects scrolling via the cursor keys only (and the space bar) You just cleared up two mysteries that have been puzzling me for ages!
- hibbelig 3y agoI just did a quick experiment, that's all.
- Tyriar 3y agoI'm on the VS Code team and maintain xterm.js. Smooth scrolling in VS Code is primarily about animating scroll events such that scrolling with a mouse wheel doesn't just scroll an increment immediately but over a fixed time, updating at a high refresh rate. This is supported in both the editor and the terminal. The other part of smooth scroll is being able to render lines offset on the y-axis which is supported by Monaco (the editor part), but not xterm.js (the terminal part). I can't actually seem to find the issue for this, but I've been wanting to implement it for a while. It's quite simple to offset the text, the slightly harder part is to render an additional row so you can see a partially rendered line on the top/bottom.
- hibbelig 3y ago> Smooth scrolling in VS Code is primarily about animating scroll events such that scrolling with a mouse wheel doesn't just scroll an increment immediately but over a fixed time, updating at a high refresh rate. This is supported in both the editor and the terminal. Should I submit a feature request to add smoothness to the scrolling that happens when the cursor moves off-screen (e.g. by using the cursor-down key)?