aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/decorations_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-08-19 12:26:08 -0600
committerJosh Rahm <rahm@google.com>2022-08-19 13:06:41 -0600
commita7237662f96933efe29eed8212464571e3778cd0 (patch)
tree27930202726b4251437c8cfa53069f65b4db90dc /test/functional/ui/decorations_spec.lua
parent02292344929069ea63c0bb872cc22d552d86b67f (diff)
parentb2f979b30beac67906b2dd717fcb6a34f46f5e54 (diff)
downloadrneovim-tmp.tar.gz
rneovim-tmp.tar.bz2
rneovim-tmp.zip
Merge branch 'master' of https://github.com/neovim/neovim into rahmtmp
Diffstat (limited to 'test/functional/ui/decorations_spec.lua')
-rw-r--r--test/functional/ui/decorations_spec.lua38
1 files changed, 33 insertions, 5 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index 9af5d386db..789f1c6487 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -193,7 +193,7 @@ describe('decorations providers', function()
|
]]}
- meths._set_hl_ns(ns1)
+ meths.set_hl_ns(ns1)
screen:expect{grid=[[
{10: 1 }{11:// just to see if there was an accid}|
{10: }{11:ent} |
@@ -219,7 +219,7 @@ describe('decorations providers', function()
local ns2 = a.nvim_create_namespace 'ns2'
a.nvim_set_decoration_provider (ns2, {
on_win = function (_, win, buf)
- a.nvim__set_hl_ns(win == thewin and _G.ns1 or ns2)
+ a.nvim_set_hl_ns_fast(win == thewin and _G.ns1 or ns2)
end;
})
]]
@@ -266,7 +266,7 @@ describe('decorations providers', function()
]]}
meths.set_hl(ns1, 'LinkGroup', {fg = 'Blue'})
- meths._set_hl_ns(ns1)
+ meths.set_hl_ns(ns1)
screen:expect{grid=[[
// just to see if there was an accident |
@@ -302,7 +302,7 @@ describe('decorations providers', function()
]]}
meths.set_hl(ns1, 'LinkGroup', {fg = 'Blue', default=true})
- meths._set_hl_ns(ns1)
+ meths.set_hl_ns(ns1)
feed 'k'
screen:expect{grid=[[
@@ -1681,7 +1681,7 @@ l5
screen:expect{grid=[[
S4S1^l1 |
- S2x l2 |
+ x S2l2 |
S5{1: }l3 |
{1: }l4 |
{1: }l5 |
@@ -1779,6 +1779,34 @@ l5
]]}
end)
+ it('works with priority #19716', function()
+ screen:try_resize(20, 3)
+ insert(example_text)
+ feed 'gg'
+
+ helpers.command('sign define Oldsign text=O3')
+ helpers.command([[exe 'sign place 42 line=1 name=Oldsign priority=10 buffer=' . bufnr('')]])
+
+ meths.buf_set_extmark(0, ns, 0, -1, {sign_text='S4', priority=100})
+ meths.buf_set_extmark(0, ns, 0, -1, {sign_text='S2', priority=5})
+ meths.buf_set_extmark(0, ns, 0, -1, {sign_text='S5', priority=200})
+ meths.buf_set_extmark(0, ns, 0, -1, {sign_text='S1', priority=1})
+
+ screen:expect{grid=[[
+ S1S2O3S4S5^l1 |
+ {1: }l2 |
+ |
+ ]]}
+
+ -- Check truncation works too
+ meths.win_set_option(0, 'signcolumn', 'auto')
+
+ screen:expect{grid=[[
+ S5^l1 |
+ {1: }l2 |
+ |
+ ]]}
+ end)
end)
describe('decorations: virt_text', function()