mirror of
https://github.com/neovim/neovim.git
synced 2026-06-15 16:23:48 +00:00
feat(extmark): virt_lines_overflow "wrap" and "auto"
Problem: Extmark has support for horizontal scrolling and truncating, but not wrapping. Solution: Extend virt_lines_overflow flags to support "wrap" and "auto" based on proposed changes in #18282.
This commit is contained in:
@@ -1738,6 +1738,50 @@ describe('API/extmarks', function()
|
||||
},
|
||||
}, get_extmark_by_id(ns, marks[3], { details = true }))
|
||||
|
||||
-- verify 'wrap' is returned through get_extmark_by_id to validate flag comparison
|
||||
set_extmark(ns, marks[4], 0, 0, {
|
||||
priority = 0,
|
||||
ui_watched = true,
|
||||
virt_lines = { { { '', 'Macro' }, { '' }, { '', '' } } },
|
||||
virt_lines_overflow = 'wrap',
|
||||
})
|
||||
eq({
|
||||
0,
|
||||
0,
|
||||
{
|
||||
ns_id = ns,
|
||||
right_gravity = true,
|
||||
ui_watched = true,
|
||||
priority = 0,
|
||||
virt_lines = { { { '', 'Macro' }, { '' }, { '', '' } } },
|
||||
virt_lines_above = false,
|
||||
virt_lines_leftcol = false,
|
||||
virt_lines_overflow = 'wrap',
|
||||
},
|
||||
}, get_extmark_by_id(ns, marks[4], { details = true }))
|
||||
|
||||
-- verify 'auto' is returned through get_extmark_by_id to validate flag comparison
|
||||
set_extmark(ns, marks[5], 0, 0, {
|
||||
priority = 0,
|
||||
ui_watched = true,
|
||||
virt_lines = { { { '', 'Macro' }, { '' }, { '', '' } } },
|
||||
virt_lines_overflow = 'auto',
|
||||
})
|
||||
eq({
|
||||
0,
|
||||
0,
|
||||
{
|
||||
ns_id = ns,
|
||||
right_gravity = true,
|
||||
ui_watched = true,
|
||||
priority = 0,
|
||||
virt_lines = { { { '', 'Macro' }, { '' }, { '', '' } } },
|
||||
virt_lines_above = false,
|
||||
virt_lines_leftcol = false,
|
||||
virt_lines_overflow = 'auto',
|
||||
},
|
||||
}, get_extmark_by_id(ns, marks[5], { details = true }))
|
||||
|
||||
set_extmark(ns, marks[4], 0, 0, { cursorline_hl_group = 'Statement' })
|
||||
eq({
|
||||
0,
|
||||
|
||||
Reference in New Issue
Block a user