patch 9.1.0708: Recursive window update does not account for reset skipcol Commit: https://github.com/vim/vim/commit/3d5065fc7553c8de3d0555c3085165bdd724663b Author: Luuk van Baal <luukvb...@gmail.com> Date: Sun Sep 1 10:33:56 2024 +0200
patch 9.1.0708: Recursive window update does not account for reset skipcol Problem: Window is updated with potentially invalid skipcol in recursive window update path. I.e. cursor outside of visible range in large line that does not fit. Solution: Make sure it is valid (Luuk van Baal). closes: #15605 Signed-off-by: Luuk van Baal <luukvb...@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/src/drawscreen.c b/src/drawscreen.c index 9096c28df..1802adeab 100644 --- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -2774,7 +2774,7 @@ win_update(win_T *wp) redrawWinline(wp, wp->w_cursor.lnum); } #endif - // New redraw either due to updated topline or due to wcol fix. + // New redraw either due to updated topline, wcol fix or reset skipcol. if (wp->w_redr_type != 0) { // Don't update for changes in buffer again. @@ -2782,6 +2782,7 @@ win_update(win_T *wp) curbuf->b_mod_set = FALSE; j = curbuf->b_mod_xlines; curbuf->b_mod_xlines = 0; + curs_columns(TRUE); win_update(curwin); curbuf->b_mod_set = i; curbuf->b_mod_xlines = j; diff --git a/src/testdir/dumps/Test_smooth_long_scrolloff_1.dump b/src/testdir/dumps/Test_smooth_long_scrolloff_1.dump index 6c1d2231f..f6ca843e7 100644 --- a/src/testdir/dumps/Test_smooth_long_scrolloff_1.dump +++ b/src/testdir/dumps/Test_smooth_long_scrolloff_1.dump @@ -1,8 +1,8 @@ -| +0&#ffffff0@39 -@40 -@40 -> @39 -@40 -@40 -@40 -@40 +|<+0#4040ff13#ffffff0@2|t+0#0000000&|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t +|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l +|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| +>t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| +|l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g +| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o +| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n +| @39 diff --git a/src/testdir/dumps/Test_smooth_long_scrolloff_7.dump b/src/testdir/dumps/Test_smooth_long_scrolloff_7.dump index c21c0229a..6d7e1578d 100644 --- a/src/testdir/dumps/Test_smooth_long_scrolloff_7.dump +++ b/src/testdir/dumps/Test_smooth_long_scrolloff_7.dump @@ -1,8 +1,8 @@ -| +0&#ffffff0@39 -@40 -@40 -@40 -@40 -@40 -> @39 +|<+0#4040ff13#ffffff0@2|l+0#0000000&|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l +|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| +|t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| +|l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g +| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o +| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n +>g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| @20 @40 diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim index 1b60019c3..47a3cf818 100644 --- a/src/testdir/test_scroll_opt.vim +++ b/src/testdir/test_scroll_opt.vim @@ -1162,7 +1162,6 @@ func Test_smooth_long_scrolloff() END call writefile(lines, 'XSmoothLongScrolloff', 'D') let buf = RunVimInTerminal('-u NONE -S XSmoothLongScrolloff', #{rows: 8, cols: 40}) - "FIXME: empty screen due to reset_skipcol()/curs_columns() shenanigans call term_sendkeys(buf, ":norm j721|\<CR>") call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_1', {}) @@ -1182,7 +1181,6 @@ func Test_smooth_long_scrolloff() call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_6', {}) call term_sendkeys(buf, "gk") - "FIXME: empty screen due to reset_skipcol()/curs_columns() shenanigans call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_7', {}) call StopVimInTerminal(buf) diff --git a/src/version.c b/src/version.c index 935b533ef..28e269045 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 708, /**/ 707, /**/ -- -- 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 vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/E1skgCl-004Cmu-DO%40256bit.org.