aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/scroll_opt_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-06 06:34:02 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-06-06 06:37:27 +0800
commitfc908b500683215085ee6c12b41aa227332b7bbe (patch)
tree55224edd080076a2ed5410fe7c24eeee1be87509 /test/functional/legacy/scroll_opt_spec.lua
parent9978a9996dae9b62763db6772e7f1f777caacb45 (diff)
downloadrneovim-fc908b500683215085ee6c12b41aa227332b7bbe.tar.gz
rneovim-fc908b500683215085ee6c12b41aa227332b7bbe.tar.bz2
rneovim-fc908b500683215085ee6c12b41aa227332b7bbe.zip
vim-patch:9.0.1610: display is wrong when 'smoothscroll' is set
Problem: Display is wrong when 'smoothscroll' is set and scrolling multiple lines. Solution: Redraw with UPD_NOT_VALID when "skipcol" is or was set. (closes vim/vim#12490, closes vim/vim#12468) https://github.com/vim/vim/commit/d9a92dc70b20c76cef9ca186676583c92c14311c
Diffstat (limited to 'test/functional/legacy/scroll_opt_spec.lua')
-rw-r--r--test/functional/legacy/scroll_opt_spec.lua24
1 files changed, 19 insertions, 5 deletions
diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua
index bb0ada15e9..a5a6aded79 100644
--- a/test/functional/legacy/scroll_opt_spec.lua
+++ b/test/functional/legacy/scroll_opt_spec.lua
@@ -874,10 +874,11 @@ describe('smoothscroll', function()
})
exec([[
setlocal cursorline scrolloff=0 smoothscroll
- call setline(1, repeat([''], 9))
+ call setline(1, repeat([''], 8))
call setline(3, repeat('a', 50))
- call setline(8, 'bbb')
- call setline(9, 'ccc')
+ call setline(4, repeat('a', 50))
+ call setline(7, 'bbb')
+ call setline(8, 'ccc')
redraw
]])
screen:expect([[
@@ -885,8 +886,8 @@ describe('smoothscroll', function()
|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaa |
- |
- |
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
+ aaaaaaaaaa |
|
|
bbb |
@@ -895,14 +896,27 @@ describe('smoothscroll', function()
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)