aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-04-13 21:38:01 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2021-04-14 13:04:33 +0200
commit7b488314d09ec75420e7d5a7ec4df62151611cd6 (patch)
treebb96b10232cbc43fff03ab40ca218d244ec4e618 /test
parent38930272009662cee1704dbb8dd0cd72260e6b05 (diff)
downloadrneovim-7b488314d09ec75420e7d5a7ec4df62151611cd6.tar.gz
rneovim-7b488314d09ec75420e7d5a7ec4df62151611cd6.tar.bz2
rneovim-7b488314d09ec75420e7d5a7ec4df62151611cd6.zip
decoration: Clean up duplicate Decoration attributes + bonus hl_eol flag
Diffstat (limited to 'test')
-rw-r--r--test/functional/ui/decorations_spec.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index 295a54aec8..82d3075be2 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -29,6 +29,7 @@ describe('decorations providers', function()
[10] = {italic = true, background = Screen.colors.Magenta};
[11] = {foreground = Screen.colors.Red, background = tonumber('0x005028')};
[12] = {foreground = tonumber('0x990000')};
+ [13] = {background = Screen.colors.LightBlue};
}
end)
@@ -331,6 +332,37 @@ describe('decorations providers', function()
|
]]}
end)
+
+ it('can highlight beyond EOL', function()
+ insert(mulholland)
+ setup_provider [[
+ local test_ns = a.nvim_create_namespace "veberod"
+ function on_do(event, ...)
+ if event == "line" then
+ local win, buf, line = ...
+ if string.find(a.nvim_buf_get_lines(buf, line, line+1, true)[1], "buf") then
+ a.nvim_buf_set_extmark(buf, test_ns, line, 0, {
+ end_line = line+1;
+ hl_group = 'DiffAdd';
+ hl_eol = true;
+ ephemeral = true;
+ })
+ end
+ end
+ end
+ ]]
+
+ screen:expect{grid=[[
+ // just to see if there was an accident |
+ // on Mulholland Drive |
+ try_start(); |
+ {13:bufref_T save_buf; }|
+ {13:switch_buffer(&save_buf, buf); }|
+ posp = getmark(mark, false); |
+ {13:restore_buffer(&save_buf);^ }|
+ |
+ ]]}
+ end)
end)
describe('extmark decorations', function()