fix(extmarks): empty inline virt_text interfering with Visual highlight

This commit is contained in:
zeertzjq
2023-06-22 13:41:13 +08:00
parent 08db61b19b
commit 0534ad8ca5
2 changed files with 8 additions and 8 deletions

View File

@@ -1675,9 +1675,11 @@ describe('decorations: inline virtual text', function()
|
]]}
meths.buf_set_extmark(0, ns, 0, 5, {virt_text={{''}, {''}}, virt_text_pos='inline'})
meths.buf_set_extmark(0, ns, 1, 14, {virt_text={{''}, {': ', 'Special'}, {'string', 'Type'}}, virt_text_pos='inline'})
feed('V')
screen:expect{grid=[[
^for _,item in ipairs(items) do |
^f{7:or _,item in ipairs(items) do} |
local text{10:: }{3:string}, hl_id_cell, count = unpack|
(item) |
if hl_id_cell ~= nil then |
@@ -1686,10 +1688,10 @@ describe('decorations: inline virtual text', function()
for _ = 1, (count or 1) do |
local cell = line[colpos] |
cell.text = text |
|
{8:-- VISUAL LINE --} |
]]}
feed('jf,')
feed('<Esc>jf,')
screen:expect{grid=[[
for _,item in ipairs(items) do |
local text{10:: }{3:string}^, hl_id_cell, count = unpack|