vim-patch:9.0.2105: skipcol not reset when topline changed (#26042)

Problem:  Skipcol is not reset when topline changed scrolling cursor to top
Solution: reset skipcol

closes: vim/vim#13528

bb800a7907
This commit is contained in:
luukvbaal
2023-11-14 23:28:56 +01:00
committed by GitHub
parent 9e2248ab58
commit f4d95c05b9
3 changed files with 45 additions and 1 deletions

View File

@@ -912,4 +912,21 @@ func Test_smoothscroll_zero_width_scroll_cursor_bot()
call StopVimInTerminal(buf)
endfunc
" scroll_cursor_top() should reset skipcol when it changes topline
func Test_smoothscroll_cursor_top()
CheckScreendump
let lines =<< trim END
set smoothscroll scrolloff=2
new | 11resize | wincmd j
call setline(1, ['line1', 'line2', 'line3'->repeat(20), 'line4'])
exe "norm G3\<C-E>k"
END
call writefile(lines, 'XSmoothScrollCursorTop', 'D')
let buf = RunVimInTerminal('-u NONE -S XSmoothScrollCursorTop', #{rows: 12, cols:40})
call VerifyScreenDump(buf, 'Test_smoothscroll_cursor_top', {})
call StopVimInTerminal(buf)
endfunc
" vim: shiftwidth=2 sts=2 expandtab