fix: flickering on opaque popups for overlapping text#19534
fix: flickering on opaque popups for overlapping text#19534JavierJF wants to merge 2 commits intovim:masterfrom
Conversation
|
Please try #19536 |
|
Hi @mattn, I have tried your branch and it doesn't address the issue. Maybe I'm missing something, but to me it's clear that those changes can't fix the issue. The issue is motivated by a double redrawn, as long as the double redraw takes place, a flicker might be seem. Unless this double redrawn is prevented, and the final character is drawn only once, this issue will continue to take place, for opaque or transparent popups (right now for both). This is why I have posted questions in the first comment on this PR, in case I was missing something, if I need to post those questions in the mailing list, please let me know! Thanks. |
|
There are a few compile errors. Can you please fix those? I am also not sure, why so many tests fail, so let's hope those were flaky |
A flickering effect was introduced in commit 6c20307 for all popups. This is a consequence of a double redraw of the overlapping background characters. This could be expected for transparent popups, but, it should exclude opaque ones. For a complete fix of the flickering this commit is required in combination with fix present in 97c5bed.
This commit revert changes introduced for tests dumps for masks in commits 6c20307 and cded5e2. These dumps were updated preventing characters from popups to take into account the masks specified for them. This forces the redraw of popup characters, even when masks attempt to prevent them, leading to flickering effects. See issues 19510 and PR 19534.
|
Hi @chrisbra, I fixed the errors and also reverted some changes in some tests. Details are in 2bdcd69. I think those changes need to be reverted, as they represent undesired behaviors for masks and popups with opacity. For Test_popupwin_popupmenu_masking_1.dump, as a result of the previous changes, the popup with the least z-index was being drawn on top of the other popups that were supposed to occlude it. For popups with transparencies, this might be desired if flickering is addressed, but for opaque popups I think it's just undesired behavior. You let me know if the PR needs more changes, thanks! |
|
Thanks! |


Description
A flickering effect was introduced in commit 6c20307 for all popups. This is a consequence of a double redraw of the overlapping background characters. This could be expected for transparent popups, but, it should exclude opaque ones. For a complete fix of the flickering this commit is required in combination with fix present in 97c5bed.
Reproduction
Sourcing this simple script with background text (this can be the script itself) reproduces the issue:
This is a video of the issue being triggered:
2026_02_28-19_18_41-issue.mp4
And this is a video with the fix applied:
2026_02_28-19_19_33-fix.mp4
Questions
Maybe this is a question for the mailing list, in this case I would ask in that channel. I would like to know which was the rationale behind the transparency feature, right now it looks like popup rendering with transparencies must end in flickering, since the background and frontend double drawing will force it. Is this a known limitation that will be addressed or it's a side effect that was unexpected when the feature was introduced?