-
Notifications
You must be signed in to change notification settings - Fork 715
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
Visual glitches in linux console. #4317
Comments
Without |
I didn't use relative line numbers very often, and they seem to cause visual flickering with Kakoune's new terminal rendering machinery which replaced `ncurses` ([related issue][issue]). [issue]: mawww/kakoune#4317
This would indicate the linux console renders every intermediate state instead of what most terminals do: render once there is no more terminal output pending. Its unfortunate because it means the current code that optimize for the amount of data on the wire leads to this flickering. The linux console is a pretty important use case, even if I rarely use it, I think it is important for Kakoune to be comfortably useable there. To fix this we can either add an option to disable the use of scrolling optimizations or just remove them altogether. |
FWIW I get the same flickering in the |
Just encountered something like that in wezterm. To be clear, do these glitches (both linux console and kitty) look like one frame is rendered with some lines in the middle skipped, or is this something different? |
Interesting comment from Wez re: this happening in modern terminal emulators: wez/wezterm#1128 (comment) So, I'll try changing 428ddeb to emit the new de-facto standard sync sequences (that are supported by iTerm2 too now). I think these new sequences should avoid the "Synchronized output does not work well with various terminals (including the linux console)" problem? (i.e. Linux console should ignore them?) |
Let's copy in @christianparpart who has been pushing/tracking the new sync sequence as well in case he has any additional insights/recommendations! |
I can confirm that using the new (supported in wezterm) escape sequences did fix the problem, without the whole pessimization done in b3a1017 :) @mawww please consider re-applying the cool optimizations but only when the terminal supports synchronization (it can be queried with |
@unrelentingtech Unfortunately this will not be enough to fix the linux console which does not seem to support any kind of synchronization. I guess the choice we have is either to have the nice scrolling optimizations (which will detect line deletions and scrolling) or to ensure no flickering on linux console. I have been trying to see if there is any way to have the scrolling optimization while avoiding intermediate states with lines at a wrong locations, but could not come up with any satisfying solution. This mostly happens with relative line numbers so an alternative would be to just say that linux console will flicker with that setting. |
I mean, if you do it conditionally — the Linux console would not report support for the new sync, so the unoptimized codepath would be used on it. |
Sounds like a nice approach, I'll see how it goes (my main concern is the added code complexity if we really need two separate code path) |
I am not sure this will necessarily lead to duplicate code paths IMHO. But i am glad to see more software taking advantage of the synchronized output feature. :-) |
Dupe of #3429 ? |
terminal_synchronized ui_option now also controls this behaviour, update out of date documentation for ui_options as well. As discussed in #4317
@unrelentingtech Implemented opt-in behaviour to the smart diff based screen update if I intend to use DECRQM eventually to set the default for that behaviour. |
Enable it if supported by default, let the user override it with the existing terminal_synchronized ui option. This should finalize work discussed on #4317
Enable it if supported by default, let the user override it with the existing terminal_synchronized ui option. This should finalize work discussed on mawww#4317
Just validate if line changed or not. This should avoid flickering on terminals such as the linux console that eagerly redraw on line deletions. Unfortunately this means drawing will use more data and might add a bit of latency on slow links. Fixes mawww#4317 Fixes mawww#4320
terminal_synchronized ui_option now also controls this behaviour, update out of date documentation for ui_options as well. As discussed in mawww#4317
Enable it if supported by default, let the user override it with the existing terminal_synchronized ui option. This should finalize work discussed on mawww#4317
Steps
use
add-highlighter global/ number-lines -relative
Open file in linux tty and start scrolling with j and k.
Outcome
Visual glitches.
The text was updated successfully, but these errors were encountered: