]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0918: screen: fill char with a zero low byte is stored as a NUL cell v9.2.0918
authorHirohito Higashi <h.east.727@gmail.com>
Thu, 6 Aug 2026 19:23:04 +0000 (19:23 +0000)
committerChristian Brabandt <cb@256bit.org>
Thu, 6 Aug 2026 19:23:04 +0000 (19:23 +0000)
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) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/screen.c
src/version.c

index 07a237b0c61bc98f0641081ce6438a631b0cfd33..201238c94dcdc4fe528e8f6e66b74d0382014423 100644 (file)
@@ -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;
index 5be07d868eb571b501757147f6641cb82eccea04..749988b251ff9165fa111eada2700aee36e9f22e 100644 (file)
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    918,
 /**/
     917,
 /**/