diff options
Diffstat (limited to 'test/functional/ui/decorations_spec.lua')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index e430865df6..b301ed8353 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -10,6 +10,7 @@ local expect_events = helpers.expect_events local meths = helpers.meths local curbufmeths = helpers.curbufmeths local command = helpers.command +local assert_alive = helpers.assert_alive describe('decorations providers', function() local screen @@ -80,7 +81,7 @@ describe('decorations providers', function() local ns2 = api.nvim_create_namespace "ns2" api.nvim_set_decoration_provider(ns2, {}) ]]) - helpers.assert_alive() + assert_alive() end) it('leave a trace', function() @@ -1092,7 +1093,7 @@ describe('extmark decorations', function() {1:~ }| | ]]} - helpers.assert_alive() + assert_alive() end) it('conceal #19007', function() @@ -1258,6 +1259,9 @@ describe('decorations: inline virtual text', function() [13] = {reverse = true}; [14] = {foreground = Screen.colors.SlateBlue, background = Screen.colors.LightMagenta}; [15] = {bold = true, reverse = true}; + [16] = {foreground = Screen.colors.Red}; + [17] = {background = Screen.colors.LightGrey, foreground = Screen.colors.DarkBlue}; + [18] = {background = Screen.colors.LightGrey, foreground = Screen.colors.Red}; } ns = meths.create_namespace 'test' @@ -1971,6 +1975,37 @@ bbbbbbb]]) ]], }) end) + + it('does not crash at column 0 when folded in a wide window', function() + screen:try_resize(82, 4) + command('hi! CursorLine guibg=NONE guifg=Red gui=NONE') + command('set cursorline') + insert([[ + aaaaa + bbbbb + ccccc]]) + meths.buf_set_extmark(0, ns, 0, 0, { virt_text = {{'foo'}}, virt_text_pos = 'inline' }) + screen:expect{grid=[[ + fooaaaaa | + bbbbb | + {16:cccc^c }| + | + ]]} + command('1,2fold') + screen:expect{grid=[[ + {17:+-- 2 lines: aaaaa·······························································}| + {16:cccc^c }| + {1:~ }| + | + ]]} + feed('k') + screen:expect{grid=[[ + {18:^+-- 2 lines: aaaaa·······························································}| + ccccc | + {1:~ }| + | + ]]} + end) end) describe('decorations: virtual lines', function() |