Smooth scrolling #2355
Replies: 9 comments 25 replies
-
|
Thinking about it. |
Beta Was this translation helpful? Give feedback.
-
|
Idea: Only scroll the lines that change, so the bottom bar in Vim or any other editor doesn't flicker. Would make a much smoother experience |
Beta Was this translation helpful? Give feedback.
-
|
Closed #1934 for this, really "merged" then. As we consider smooth scrolling we can address when the cursor is part of the scroll and how we can perhaps bring generalized animation into our renderers. |
Beta Was this translation helpful? Give feedback.
-
|
Converted this to a discussion because it isn't directly actionable and a significant amount of design work needs to be done. We can tear off actionable issues as we get there. |
Beta Was this translation helpful? Give feedback.
-
|
Getting smooth scroll working in programs like Neovim will be more difficult. For example take Neovide. In Neovide if you open a terminal inside Neovim, the smooth scroll dosent work inside that. That is bexause Neovim does its own thing inside that terminal and does not know that it is running inside Neovide. |
Beta Was this translation helpful? Give feedback.
-
|
Ghostty is a terminal emulator, not a neovim client. This would be impossible to implement because there is no notion of partial scrolling in the terminal, just the redrawing of lines, cursor movement, and whatever else is described by ansi escape codes these days. Any attempt at adding smooth scrolling would only be as capable as something like tmux copy-mode. |
Beta Was this translation helpful? Give feedback.
-
|
Let's just focus on scrolling on the primary screen for now - alternate screen smooth scrolling would likely require a separate protocol for defining partial scroll regions within TUIs, which is a much more complex task. On the GTK side I think this will come naturally with #111. Instead of handling mouse events ourselves we should rely on GTK's scrollbar system, and map scrollbar positions into lines. Then, all we need to do to implement smooth scrolling is to support the idea of "fractional lines" in the renderer. Everything after that should come smoothly (pun intended). |
Beta Was this translation helpful? Give feedback.
-
|
I think it would be good if something like this could be implemented through some terminal API that could be called from, for example, the nvim extension. Then there is no need to store code to support different programs in the ghostty repo, and different programs can implement their own behavior for pixel based scrolling. for example this function will work well for nvim only if ui elements (statusline, ...) are not scrolled |
Beta Was this translation helpful? Give feedback.
-
|
As it doesn't seem to have been said in above discussion: Smooth scrolling for the main terminal window is really helpful, as it allows you to scroll fast and slow through huge volumes of text without loosing your reading position as easily. This helps greatly with glancing through programs that generate a lot of output. For me, one prime example are docker builds, or ansible deployments. Especially the latter create huge output volumes in check mode that I need to quickly look through to see if there are unexpected changes. And while of course that is possible with line scrolling (like it is implemented now) I like smooth scrolling much better and think it helps me with retaining context while scrolling as lines do not jump. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
As the title says, smooth scrolling (bonus points if the beizer curve is configurable) would be nice
Beta Was this translation helpful? Give feedback.
All reactions