vim-patch:8.2.4062: match highlighting of tab too short

Problem:    Match highlighting of tab too short.
Solution:   Do not stop match highlighting if on a Tab. (Christian Brabandt,
            closes vim/vim#9507, closes vim/vim#9500)

0bbca540f7

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2022-11-24 19:05:53 +08:00
parent e38ae3b74f
commit a98970219d
3 changed files with 47 additions and 2 deletions

View File

@@ -97,4 +97,30 @@ describe('match highlighting', function()
:s/0^ |
]])
end)
it('on a Tab vim-patch:8.2.4062', function()
local screen = Screen.new(75, 10)
screen:set_default_attr_ids({
[0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText
[1] = {background = Screen.colors.Red, foreground = Screen.colors.White}, -- ErrorMsg
})
screen:attach()
exec([[
set linebreak
call setline(1, "\tix")
call matchadd('ErrorMsg', '\t')
]])
screen:expect([[
{1: ^ }ix |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
|
]])
end)
end)