diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2023-11-14 17:05:18 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-11-14 17:05:18 +0100 |
commit | bb800a7907209f7d349f87b76b3b9ca30b416298 (patch) | |
tree | 1a7b1b3aad1cc52050c1299935b5222d3e70b53e /src/testdir | |
parent | bc8f79d36a456054ed29f46585830af6d71f57c8 (diff) |
patch 9.0.2105: skipcol not reset when topline changedv9.0.2105
Problem: Skipcol is not reset when topline changed scrolling cursor to top
Solution: reset skipcol
closes: #13528
closes: #13532
Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/dumps/Test_smoothscroll_cursor_top.dump | 12 | ||||
-rw-r--r-- | src/testdir/test_scroll_opt.vim | 17 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/testdir/dumps/Test_smoothscroll_cursor_top.dump b/src/testdir/dumps/Test_smoothscroll_cursor_top.dump new file mode 100644 index 0000000000..84cc0e6489 --- /dev/null +++ b/src/testdir/dumps/Test_smoothscroll_cursor_top.dump @@ -0,0 +1,12 @@ +| +0&#ffffff0@39 +|[+1&&|N|o| |N|a|m|e|]| @30 +|l+0&&|i|n|e|1| @34 +|l|i|n|e|2| @34 +>l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3 +|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3 +|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3| @19 +|l|i|n|e|4| @34 +|~+0#4040ff13&| @38 +|~| @38 +|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @26 +| +0&&@39 diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim index 005e45bb59..d5d08a24c2 100644 --- a/src/testdir/test_scroll_opt.vim +++ b/src/testdir/test_scroll_opt.vim @@ -909,4 +909,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 |