aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-04-15 01:12:36 +0200
committerGitHub <noreply@github.com>2021-04-15 01:12:36 +0200
commit3b01e37d09933cca8b957b7517d7f7345d4ccc4f (patch)
tree4bfde71c986234879ba036ea7817d93e52a4cb2e /test
parent9471b159362aabd35ef044a95e46520e8c110a57 (diff)
parent7b488314d09ec75420e7d5a7ec4df62151611cd6 (diff)
downloadrneovim-3b01e37d09933cca8b957b7517d7f7345d4ccc4f.tar.gz
rneovim-3b01e37d09933cca8b957b7517d7f7345d4ccc4f.tar.bz2
rneovim-3b01e37d09933cca8b957b7517d7f7345d4ccc4f.zip
Merge pull request #14358 from bfredl/decodeco
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()