vim-patch:9.0.1602: stray character visible if marker on top of double-wide char (#23897)

Problem:    Stray character is visible if 'smoothscroll' marker is displayed
            on top of a double-wide character.
Solution:   When overwriting a double-width character with the 'smoothscroll'
            marker clear the second half. (closes vim/vim#12469)

ecb87dd7d3
This commit is contained in:
zeertzjq
2023-06-04 07:39:05 +08:00
committed by GitHub
parent 0a439e3863
commit 53f30de2be
3 changed files with 98 additions and 8 deletions

View File

@@ -667,6 +667,32 @@ describe('smoothscroll', function()
screen:expect(s1)
end)
-- oldtest: Test_smoothscroll_marker_over_double_width_dump()
it('marker is drawn over double-width char correctly', function()
screen:try_resize(40, 6)
exec([[
call setline(1, 'a'->repeat(&columns) .. '口'->repeat(10))
setlocal smoothscroll
]])
screen:expect([[
^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
口口口口口口口口口口 |
~ |
~ |
~ |
|
]])
feed('<C-E>')
screen:expect([[
<<< 口口口口口口口^口 |
~ |
~ |
~ |
~ |
|
]])
end)
-- oldtest: Test_smoothscroll_zero_width()
it("does not divide by zero with a narrow window", function()
screen:try_resize(12, 2)