-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Support for terminal synchronized output #79
Comments
I see. This is actually potentially very useful, even beyond just the urwid widget. I wasn't aware of this mode. By the way, about your patch: def write(self, data):
super().write("\033[?2026h" + data + "\033[?2026l")
I'll try it out with Thanks so much. |
I've tried it out and yes, it improves (or completely eliminates on some e.g Wezterm) the flickering situation on terminal emulators that support the feature. I observed that Kitty still flickers when images get large (amount of bytes for the escape sequence, not necessarily size in pixels) enough (not sure what the exact threshold is) but it's still better than without the sequence. Anyways, as long as there are no large (by size in pixels) and (not "or") pixel-dense images on-screen, it should be just fine. Looking at the original spec for the feature, it states:
I suspect the reason for kitty still flickering is either due to the condition above or a timeout (also specified in the spec). |
While trying this out, I realized that it can't work along with I don't know why it never occurred to me until now but the I'm considering moving this functionality (automatically clearing images) into By the way, I'd also like to add support for this in |
Thanks for trying this out. I was so happy to see there was an easily overridable method in And you are probably correct that the remaining flicker with Kitty is due to an aggressive timeout setting or bytes-transferred setting. I might dig into that code looking for what they do, if I have some time. I think that the right thing to do is kill |
Now that you've implemented the code for testing purposes, do you still need me to write a PR? |
Which code? 🤔 If it's Kitty's, this might be a starting point, though the feature was already implemented before that.
Ok, good. IMO, the performance is not noticeable (to a human) even for a UI that looks like: Note that
I just thought since you brought it up... but you're right. I shouldn't bother you. 😃 |
I'll leave this issue open until I implement it in the library's core. Once again, thanks so much for all your suggestions and help. 🙏 |
The attached patch is an update for UrwidImageScreen to support the terminal sychronized output spec
sync.patch
I thought it might help the Kitty scroll flicker issue and maybe it does - a little? But the flicker definitely is still there.
Give it a try and see for yourself if it helps anything. Should be harmless on terminals that do not support the spec - but I know that recent versions of Kitty and iTerm2 do.
The text was updated successfully, but these errors were encountered: