aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/highlight_spec.lua
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2024-08-15 06:09:14 -0500
committerGitHub <noreply@github.com>2024-08-15 06:09:14 -0500
commit4199671047b0cb62781995a8f6a4b66fb6e8b6fd (patch)
tree9018e8b4765279f423c89b41a3a27f52d7029fdc /test/functional/terminal/highlight_spec.lua
parentf3677c71f04ee6ef52449664dfb37f0477fd7305 (diff)
downloadrneovim-4199671047b0cb62781995a8f6a4b66fb6e8b6fd.tar.gz
rneovim-4199671047b0cb62781995a8f6a4b66fb6e8b6fd.tar.bz2
rneovim-4199671047b0cb62781995a8f6a4b66fb6e8b6fd.zip
feat(term): support OSC 8 hyperlinks in :terminal (#30050)
Diffstat (limited to 'test/functional/terminal/highlight_spec.lua')
-rw-r--r--test/functional/terminal/highlight_spec.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/terminal/highlight_spec.lua b/test/functional/terminal/highlight_spec.lua
index 4f3d010d02..ca41cbf4a2 100644
--- a/test/functional/terminal/highlight_spec.lua
+++ b/test/functional/terminal/highlight_spec.lua
@@ -380,3 +380,23 @@ describe(':terminal highlight with custom palette', function()
]])
end)
end)
+
+describe(':terminal', function()
+ before_each(clear)
+
+ it('can display URLs', function()
+ local screen = Screen.new(50, 7)
+ screen:add_extra_attr_ids {
+ [100] = { url = 'https://example.com' },
+ }
+ screen:attach()
+ local chan = api.nvim_open_term(0, {})
+ api.nvim_chan_send(chan, '\027]8;;https://example.com\027\\Example\027]8;;\027\\')
+ screen:expect({
+ grid = [[
+ {100:^Example} |
+ |*6
+ ]],
+ })
+ end)
+end)