From: Hirohito Higashi Date: Thu, 6 Aug 2026 19:23:04 +0000 (+0000) Subject: patch 9.2.0918: screen: fill char with a zero low byte is stored as a NUL cell X-Git-Tag: v9.2.0918^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ae09867ff36a85b0328d43fb5672067fb5b3409;p=thirdparty%2Fvim.git patch 9.2.0918: screen: fill char with a zero low byte is stored as a NUL cell Problem: Using a multibyte fill character whose lower byte is zero, such as U+2500 for a popup border or 'fillchars', stores a NUL in ScreenLines[]. That marks the cell as the right half of a double-width character, and the GUI reports E340 when the window is resized (iranoan). Solution: Store 0x80 instead of the truncated character code, like fold_line() already does (Hirohito Higashi) related: vim-jp/issues#1460 closes: #20960 Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Hirohito Higashi Signed-off-by: Christian Brabandt --- diff --git a/src/screen.c b/src/screen.c index 07a237b0c6..201238c94d 100644 --- a/src/screen.c +++ b/src/screen.c @@ -1233,6 +1233,7 @@ skip_opacity: { ScreenLinesUC[off_to] = c; ScreenLinesC[0][off_to] = 0; + ScreenLines[off_to] = 0x80; // avoid storing zero } else ScreenLinesUC[off_to] = 0; @@ -3081,6 +3082,7 @@ skip_opacity_fill: { ScreenLinesUC[off] = c; ScreenLinesC[0][off] = 0; + ScreenLines[off] = 0x80; // avoid storing zero } else ScreenLinesUC[off] = 0; diff --git a/src/version.c b/src/version.c index 5be07d868e..749988b251 100644 --- a/src/version.c +++ b/src/version.c @@ -763,6 +763,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 918, /**/ 917, /**/