Commit: patch 9.2.0919: screen: the wrong array is copied into ScreenCols on a resize
Christian Brabandt <[email protected]> Thu, 6 Aug 2026 22:00:04 +0200
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <[email protected]> |
patch 9.2.0919: screen: the wrong array is copied into ScreenCols on a resize Commit: https://github.com/vim/vim/commit/1989e9922a0ac2fddb0085b490bc10cd232ca598 Author: Hirohito Higashi <[email protected]> Date: Thu Aug 6 19:38:04 2026 +0000 patch 9.2.0919: screen: the wrong array is copied into ScreenCols on a resize 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) <[email protected]> Signed-off-by: Hirohito Higashi <[email protected]> Signed-off-by: Christian Brabandt <[email protected]> diff --git a/src/screen.c b/src/screen.c index 201238c94..b4cf42ee6 100644 --- a/src/screen.c +++ b/src/screen.c @@ -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)); } } diff --git a/src/version.c b/src/version.c index 749988b25..a3bf4a35a 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 */ +/**/ + 919, /**/ 918, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1ws4G4-00GY6G-DH%40256bit.org.