Skip to content

Commit 38a02a0

Browse files
Revert "feat(hyperlinks): Add OSC 8 hyperlink support to links"
This reverts commit eb7a110.
1 parent eb7a110 commit 38a02a0

File tree

1 file changed

+2
-11
lines changed
  • lua/orgmode/colors/highlighter/markup

1 file changed

+2
-11
lines changed

lua/orgmode/colors/highlighter/markup/link.lua

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
local ts_utils = require('orgmode.utils.treesitter')
2-
local utils = require('orgmode.utils')
32

43
---@class OrgLinkHighlighter : OrgMarkupHighlighter
54
---@field private markup OrgMarkupHighlighter
6-
---@field private has_extmark_url_support boolean
75
local OrgLink = {}
86

97
---@param opts { markup: OrgMarkupHighlighter }
108
function OrgLink:new(opts)
119
local data = {
1210
markup = opts.markup,
13-
has_extmark_url_support = utils.has_version_10(),
1411
}
1512
setmetatable(data, self)
1613
self.__index = self
@@ -103,18 +100,12 @@ function OrgLink:highlight(highlights, bufnr)
103100
local alias = link:find('%]%[') or 1
104101
local link_end = link:find('%]%[') or (link:len() - 1)
105102

106-
local link_opts = {
103+
vim.api.nvim_buf_set_extmark(bufnr, namespace, entry.from.line, entry.from.start_col, {
107104
ephemeral = ephemeral,
108105
end_col = entry.to.end_col,
109106
hl_group = '@org.hyperlink',
110107
priority = 110,
111-
}
112-
113-
if self.has_extmark_url_support then
114-
link_opts.url = alias > 1 and link:sub(3, alias - 1) or link:sub(3, -3)
115-
end
116-
117-
vim.api.nvim_buf_set_extmark(bufnr, namespace, entry.from.line, entry.from.start_col, link_opts)
108+
})
118109

119110
vim.api.nvim_buf_set_extmark(bufnr, namespace, entry.from.line, entry.from.start_col, {
120111
ephemeral = ephemeral,

0 commit comments

Comments
 (0)