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

fix(tui): delay initial clear until we know the bg color and termguicolors value #26550

Closed
wants to merge 1 commit into from

Conversation

bfredl
Copy link
Member

@bfredl bfredl commented Dec 13, 2023

Note: I haven't been able to reproduce the issue myself (pangoterm rendering go brrr), but It might help with the case where termguicolors is changed during startup.

@github-actions github-actions bot added the tui label Dec 13, 2023
@IngoMeyer441
Copy link

I can confirm that your patch is working. 👍 I tested it in Kitty with termguicolors set.

@gpanders
Copy link
Member

Even without this patch, but with #26579 now in master, I can no longer reproduce the original issue from #26372, even when artificially introducing a delay using nvim --cmd 'sleep 1'.

@bfredl
Copy link
Member Author

bfredl commented Dec 15, 2023

yes, #26579 has the same effect as this w.r.t the visual change. This PR (as a replacement) would only be required if it is necessary to check the detected value of termguicolors early even if it doesn't take effect (I can't think of a good reason, but it is what it would do)

@bfredl
Copy link
Member Author

bfredl commented Dec 15, 2023

after discussing a bit on matrix, we concluded always setting 'termguicolors' as a OptionSet event is simpler (rather than having it sometimes being pre-set and sometimes being delayed to after startup, depending on the exact timing). So anyone who cares about the detected value should use an OptionSet event anyways.

@bfredl bfredl closed this Dec 15, 2023
@bfredl
Copy link
Member Author

bfredl commented Dec 15, 2023

so, this might still be relevant for cases where the user set termguicolors manually. (my problem is that even my craptop is fast enough to never see this kind of flicker, after all rendering a terminal is peanuts compared to surfing the modern web, so I wouldn't really know )

@IngoMeyer441
Copy link

IngoMeyer441 commented Jan 2, 2024

Without this patch, I can still recognize flicker in tmux in Kitty 0.31.0. There is a black frame for some milliseconds, followed by the correct background color. With this patch, I never see the black background.

@towry

This comment was marked as outdated.

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

Successfully merging this pull request may close these issues.

None yet

4 participants