When 'virtualedit' is "all" and 'cursorcolumn' is set, the wrong column may be
highlighted. (van-de-bugger, 2018 Jan 23, #2576)
-With 'smoothscroll' set and "lastline" in 'display', moving the cursor to a
-wrapping line that makes the display scroll up may scroll much more than
-needed, thus jump-scrolling. (part of issue 12411)
Errors when running tests with valgrind:
- test_codestyle.vim: e.g.:
command line..script /home/mool/vim/vim91/src/testdir/runtest.vim[569]..function RunTheTest[52]..Test_test_files line 6: keycode_check.vim: space before tab: Expected 0 but got 7
used = curwin->w_cline_height;
#endif
+ if (do_sms && (dy_flags & DY_LASTLINE))
+ {
+ // The rest of the cursor line may be cut off at the bottom.
+ int upto_cursor = plines_win_col(curwin, cln, curwin->w_cursor.col);
+
+ if (upto_cursor < used)
+ used = upto_cursor;
+ }
+
// If the cursor is on or below botline, we will at least scroll by the
// height of the cursor line, which is "used". Correct for empty lines,
// which are really part of botline.
bwipe!
endfunc
+func Test_smoothscroll_lastline_no_jump()
+ call NewWindow(10, 40)
+ setlocal smoothscroll
+ set display=lastline
+ call setline(1, map(range(1, 9), {i, v -> 'short ' .. v})
+ \ + [repeat('long ', 60)] + repeat(['tail'], 5))
+ normal! gg
+ redraw
+ call assert_equal(1, line('w0'))
+
+ " The first screen line of the wrapping line is already visible.
+ normal! 9j
+ redraw
+ call assert_equal(10, line('.'))
+ call assert_equal(1, line('w0'))
+
+ set display&
+ bwipe!
+endfunc
+
func Test_smoothscroll_long_line_zb()
call NewWindow(10, 40)
call setline(1, 'abcde '->repeat(150))
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 887,
/**/
886,
/**/