diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-08-20 08:20:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-20 08:20:19 +0800 |
commit | a8fbe1d409e08c68b05bc26b096486020ae3162b (patch) | |
tree | 0f1a85498382cb7d3674ca33701f6fc156a581f5 /test/functional/ui | |
parent | 1d11808bfd2879bf278cd05a7095a6634fa5afec (diff) | |
download | rneovim-a8fbe1d409e08c68b05bc26b096486020ae3162b.tar.gz rneovim-a8fbe1d409e08c68b05bc26b096486020ae3162b.tar.bz2 rneovim-a8fbe1d409e08c68b05bc26b096486020ae3162b.zip |
fix(decor): don't use separate DecorSignHighlight for url (#30096)
Diffstat (limited to 'test/functional/ui')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 49ba4a7096..1709819575 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -2341,21 +2341,28 @@ describe('extmark decorations', function() it('supports URLs', function() insert(example_text) - local url = 'https://example.com' + local url1 = 'https://example.com' + local url2 = 'http://127.0.0.1' screen:add_extra_attr_ids { - u = { url = "https://example.com" }, + u = { url = url1 }, + uh = { url = url2, background = Screen.colors.Yellow }, } api.nvim_buf_set_extmark(0, ns, 1, 4, { end_col = 14, - url = url, + url = url1, + }) + api.nvim_buf_set_extmark(0, ns, 2, 4, { + end_col = 17, + hl_group = 'Search', + url = url2, }) - screen:expect{grid=[[ + screen:expect([[ for _,item in ipairs(items) do | {u:local text}, hl_id_cell, count = unpack(item) | - if hl_id_cell ~= nil then | + {uh:if hl_id_cell} ~= nil then | hl_id = hl_id_cell | end | for _ = 1, (count or 1) do | @@ -2368,7 +2375,7 @@ describe('extmark decorations', function() {1:~ }| {1:~ }| | - ]]} + ]]) end) it('can replace marks in place with different decorations #27211', function() |