On Win32 console, BSU/ESU (Synchronized Output) is not supported.
This causes visible flickering when moving the cursor while opacity popups are displayed.
The cause is that background lines under opacity popups are redrawn every cycle. During this redraw, unblended background characters are output to the console via screen_char() before update_popups() can draw the blended result on top. On terminals with BSU/ESU support, this intermediate state is buffered and invisible. On Win32 console, writes go directly to the screen buffer, making the flicker visible.
The fix adds a check at the top of screen_char(): if the cell is covered by a higher-zindex opacity popup, output is skipped. The per-cell zindex is stored in an opacity_zindex array built in may_update_popup_mask(), allocated only when opacity popups exist.
T_CE (clear-to-eol) optimization is also disabled for lines that overlap with opacity popups. screen_char_2() gets the same check to prevent the second byte of DBCS characters from leaking through.
Additionally, the wide character boundary clearing in screen_line() now skips cells that belong to another opacity popup, preventing flicker at the edge where two opacity popups meet.
Although the primary motivation is Win32 console, the fix is platform-independent and also benefits terminals that do not support BSU/ESU synchronized output.
https://github.com/vim/vim/pull/19697
(3 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Thanks. Did this break this test case?
From test_popupwin.vim:
Found errors in Test_popup_opacity_wide_char_overlap():
Run 1, 14:37:58 - 14:38:00 in 1.686971 seconds:
command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_popup_opacity_wide_char_overlap[37]..VerifyScreenDump line 102: See dump file difference: call term_dumpdiff("testdir/failed/Test_popupwin_opacity_wide_1.dump", "testdir/dumps/Test_popupwin_opacity_wide_1.dump"); difference in line 4: "|い*&|え0#ffffff16#e000002|ー@6| +&| +0#0000000#ffffff0|ー&@7|い|!+&| |4| @3"; difference in line 5: "|い*&| +0#ffffff16#e000002|カ*&|ラ|フ|ル|な| +&|ー*&@1| +&| +0#0000000#ffffff0|ー*&@7|い|!+&| |5| @3"
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@mattn pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
thanks
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()