When a popup window partially overlaps a wide character (e.g., Japanese characters):
Truncated display: If only the right half of a wide character is visible, the character was displayed with its right half cut off, violating Vim's rule that "wide characters with only half visible should not be shown at all."
Garbage display: Old character data remained in the screen buffer and was visible through the popup, appearing as garbage.
call setline(1, 'This is line 1') call setline(2, 'あいうえお') call setline(3, ' かきくけこ') hi MyPopup guibg=darkblue guifg=white call popup_create(['FOO BAR'], #{ \ line: 1, \ col: 2, \ minwidth: 15, \ minheight: 3, \ highlight: 'MyPopup', \})
Before: The first character "あ" in line 2 shows only its left half (truncated). When adding spaces to line 3, garbage appears where the right half of "け" would be.
After: Characters are completely hidden when partially overlapped, and no garbage appears.
image.png (view on web)Left half of あ must not be shown.
image.png (view on web)Right half of "け" must be shown as a space.
In screen.c, when rendering wide characters that are partially blocked by a popup:
ScreenLines to prevent garbageredraw_this = FALSE)https://github.com/vim/vim/pull/19271
(1 file)
—
Reply to this email directly, view it on GitHub.
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.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
This still wrong.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
I have identified what is happening and what needs to be fixed.
This issue has two problems.
This pull request fixes only one of them. When the left edge of the popup dialog overlaps the right half of a multibyte character, set the redraw_this flag to TRUE.
And the other issue, where the right side of the pop-up dialog is not rendered correctly,
is fixed in:
#19299
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
can you please add a screendump test for the problem that this fixes?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()