fix(move): redraw for 'concealcursor' after changing w_wcol (#31276)

This commit is contained in:
zeertzjq
2024-11-20 08:24:58 +08:00
committed by GitHub
parent f111c32ff9
commit ac7e0ff32f
2 changed files with 34 additions and 8 deletions

View File

@@ -198,7 +198,7 @@ describe('Screen', function()
end)
end) -- a region of text (implicit concealing)
it('cursor position is correct when entering Insert mode with cocu=ni #13916', function()
it('cursor position when entering Insert mode with cocu=ni #13916', function()
insert([[foobarfoobarfoobar]])
-- move to end of line
feed('$')
@@ -217,6 +217,37 @@ describe('Screen', function()
{4:-- INSERT --} |
]])
end)
it('cursor position when scrolling in Normal mode with cocu=n #31271', function()
insert(('foo\n'):rep(9) .. 'foofoobarfoofoo' .. ('\nfoo'):rep(9))
command('set concealcursor=n')
command('syn match Foo /bar/ conceal cchar=&')
feed('gg5<C-E>10gg$')
screen:expect([[
foo |*4
foofoo{1:&}foofo^o |
foo |*4
|
]])
feed('zz')
screen:expect_unchanged()
feed('zt')
screen:expect([[
foofoo{1:&}foofo^o |
foo |*8
|
]])
feed('zt')
screen:expect_unchanged()
feed('zb')
screen:expect([[
foo |*8
foofoo{1:&}foofo^o |
|
]])
feed('zb')
screen:expect_unchanged()
end)
end) -- match and conceal
describe('let the conceal level be', function()