Skip to content
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

Flicker-free transition #66

Open
musjj opened this issue Aug 7, 2023 · 3 comments
Open

Flicker-free transition #66

musjj opened this issue Aug 7, 2023 · 3 comments

Comments

@musjj
Copy link

musjj commented Aug 7, 2023

I'm wondering if it'd be possible to remove the flicker that occurs when transitioning between previews. Transitions between text previews are essentially flicker-free once they're cached, but image previews are just never fast enough for it not to flicker and it's really jarring.

I had a preview script for nnn (unfortunately lost), but it had some experimental trickeries to eliminate flickering.

For images, it was simple, I just used kitty +kitten icat --image-id 1. This will replace any previous image occupying the id without any flickers.

For text, it was really hacky. I used tmux to run the previewer and wait until it's done. Then the output (along with all the escape codes) is print to the preview screen, overwriting anything that was on it. To make sure any leftovers from previous previews are cleaned up, I sent an ANSI sequence that clears everything from the cursor position to the end of the screen.

I'm wondering if this could be implemented more elegantly in ctpv. But the idea is simple, don't clear the screen until the output is completely ready.

@NikitaIvanovV
Copy link
Owner

Could you please, if it's easy to do, record a video of flickering you are experiencing and send here?

@musjj
Copy link
Author

musjj commented Aug 9, 2023

Here's a recording:

2023-08-09_07-18-25.mp4

Are you not experiencing this?

@Goosegit11
Copy link

Goosegit11 commented Sep 7, 2023

same, but I'm not sure if that's a fixable issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants