fix(winblend): treat braille blank (\u2800) as whitespace #32741

Problem:
'winblend' does not display text behind blank unicode characters other than 0x20 ascii space.

Solution:
In ui_compositor.c -> compose_line() check for either 0x20 or 0x80A0E2 (utf8 \u2800).
This commit is contained in:
Skoh
2025-04-23 14:27:21 +02:00
committed by GitHub
parent d4f2b9050d
commit bc814cfb2c
2 changed files with 45 additions and 3 deletions

View File

@@ -422,10 +422,12 @@ static void compose_line(Integer row, Integer startcol, Integer endcol, LineFlag
for (int i = col - (int)startcol; i < until - startcol; i += width) {
width = 1;
// negative space
bool thru = linebuf[i] == schar_from_ascii(' ') && bg_line[i] != NUL;
bool thru = (linebuf[i] == schar_from_ascii(' ')
|| linebuf[i] == schar_from_char(L'\u2800')) && bg_line[i] != NUL;
if (i + 1 < endcol - startcol && bg_line[i + 1] == NUL) {
width = 2;
thru &= linebuf[i + 1] == schar_from_ascii(' ');
thru &= (linebuf[i + 1] == schar_from_ascii(' ')
|| linebuf[i + 1] == schar_from_char(L'\u2800'));
}
attrbuf[i] = (sattr_T)hl_blend_attrs(bg_attrs[i], attrbuf[i], &thru);
if (width == 2) {