mirror of
https://github.com/neovim/neovim.git
synced 2026-08-27 17:41:48 +00:00
fix(drawline): 'statuscolumn' breaks unprintable char wrapping (#41198)
Problem: Evaluating 'statuscolumn' overwrites transchar_charbuf[], which breaks the drawing of an unprintable char if p_extra points there. Solution: Make a copy in wlv.extra so that it won't be overwritten.
This commit is contained in:
@@ -1130,4 +1130,21 @@ describe('statuscolumn', function()
|
||||
|
|
||||
]])
|
||||
end)
|
||||
|
||||
it('does not break wrapping at unprintable chars #41198', function()
|
||||
command([[let &statuscolumn = repeat(' ', 4)]])
|
||||
api.nvim_buf_set_lines(0, 0, -1, true, { ('\1'):rep(100), 'foo', 'bar' })
|
||||
command('normal! zb')
|
||||
screen:expect([[
|
||||
{8: }{18:^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^}|
|
||||
{8: }{18:A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A}|
|
||||
{8: }{18:^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^}|
|
||||
{8: }{18:A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A}|
|
||||
{8: }{18:^A^A} |
|
||||
{8: }foo |
|
||||
{8: }^bar |
|
||||
{1:~ }|*6
|
||||
|
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user