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)

d9a92dc70b
This commit is contained in:
zeertzjq
2023-06-06 06:34:02 +08:00
parent 9978a9996d
commit fc908b5006
3 changed files with 31 additions and 14 deletions

View File

@@ -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,8 +896,8 @@ describe('smoothscroll', function()
feed('3<C-E>')
screen:expect([[
{0:<<<}{1:aaaaaa^a }|
|
|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
aaaaaaaaaa |
|
|
bbb |
@@ -905,6 +906,19 @@ describe('smoothscroll', function()
{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()