aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-06 06:59:48 +0800
committerGitHub <noreply@github.com>2023-06-06 06:59:48 +0800
commit30e9ddfd05f5f2fa56d7fd5235a3f993b94f9910 (patch)
tree55224edd080076a2ed5410fe7c24eeee1be87509 /test/functional
parentc1ee187f82141d778335955c9603c69e6f4785d7 (diff)
parentfc908b500683215085ee6c12b41aa227332b7bbe (diff)
downloadrneovim-30e9ddfd05f5f2fa56d7fd5235a3f993b94f9910.tar.gz
rneovim-30e9ddfd05f5f2fa56d7fd5235a3f993b94f9910.tar.bz2
rneovim-30e9ddfd05f5f2fa56d7fd5235a3f993b94f9910.zip
Merge pull request #23927 from zeertzjq/vim-9.0.1603
vim-patch:9.0.{1603,1610}: display wrong if scrolling multiple lines with 'smoothscroll'
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/legacy/scroll_opt_spec.lua56
1 files changed, 56 insertions, 0 deletions
diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua
index 3320f96668..a5a6aded79 100644
--- a/test/functional/legacy/scroll_opt_spec.lua
+++ b/test/functional/legacy/scroll_opt_spec.lua
@@ -865,6 +865,62 @@ describe('smoothscroll', function()
]])
end)
+ -- oldtest: Test_smoothscroll_multi_skipcol()
+ it('scrolling mulitple lines and stopping at non-zero skipcol', function()
+ screen:try_resize(40, 10)
+ screen:set_default_attr_ids({
+ [0] = {foreground = Screen.colors.Blue, bold = true},
+ [1] = {background = Screen.colors.Grey90},
+ })
+ exec([[
+ setlocal cursorline scrolloff=0 smoothscroll
+ call setline(1, repeat([''], 8))
+ call setline(3, repeat('a', 50))
+ call setline(4, repeat('a', 50))
+ call setline(7, 'bbb')
+ call setline(8, 'ccc')
+ redraw
+ ]])
+ screen:expect([[
+ {1:^ }|
+ |
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
+ aaaaaaaaaa |
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
+ aaaaaaaaaa |
+ |
+ |
+ bbb |
+ |
+ ]])
+ feed('3<C-E>')
+ screen:expect([[
+ {0:<<<}{1:aaaaaa^a }|
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
+ aaaaaaaaaa |
+ |
+ |
+ bbb |
+ ccc |
+ {0:~ }|
+ {0:~ }|
+ |
+ ]])
+ feed('2<C-E>')
+ screen:expect([[
+ {0:<<<}{1:aaaaaa^a }|
+ |
+ |
+ bbb |
+ ccc |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ |
+ ]])
+ end)
+
it("works with virt_lines above and below", function()
screen:try_resize(55, 7)
exec([=[