]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0919: screen: the wrong array is copied into ScreenCols on a resize v9.2.0919
authorHirohito Higashi <h.east.727@gmail.com>
Thu, 6 Aug 2026 19:38:04 +0000 (19:38 +0000)
committerChristian Brabandt <cb@256bit.org>
Thu, 6 Aug 2026 19:38:04 +0000 (19:38 +0000)
Problem:  When the screen is resized without clearing, screenalloc() copies
          ScreenAttrs[] into the new ScreenCols[] instead of using
          ScreenCols[], so the virtual columns are replaced by attribute
          values.  Since colnr_T is twice the size of sattr_T it also
          reads twice the intended number of bytes.
Solution: Copy from ScreenCols[].

closes: #20961

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 201238c94dcdc4fe528e8f6e66b74d0382014423..b4cf42ee6d9c7f9d10c9f26042738fd58b6160c6 100644 (file)
@@ -3448,7 +3448,7 @@ give_up:
                            ScreenAttrs + LineOffset[old_row],
                            (size_t)len * sizeof(sattr_T));
                    mch_memmove(new_ScreenCols + new_LineOffset[new_row],
-                           ScreenAttrs + LineOffset[old_row],
+                           ScreenCols + LineOffset[old_row],
                            (size_t)len * sizeof(colnr_T));
                }
            }
index 749988b251ff9165fa111eada2700aee36e9f22e..a3bf4a35a3e7f0d5012d657ec97613ff9438e3c2 100644 (file)
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    919,
 /**/
     918,
 /**/