Revert "Fix tagrelative option not considered in builtin.tags (#2583)" (#2629)

This reverts commit 6074847b6e due to
performance regression.
This commit is contained in:
James Trew
2023-07-31 20:22:53 -04:00
committed by GitHub
parent b6fccfb0f7
commit d2e17ba18a
2 changed files with 4 additions and 27 deletions

View File

@@ -1086,9 +1086,9 @@ function make_entry.gen_from_ctags(opts)
local current_file_cache = {}
return function(line)
local tag_file
-- split line by ':'
tag_file, line = string.match(line, "([^:]+):(.+)")
if line == "" or line:sub(1, 1) == "!" then
return nil
end
local tag, file, scode, lnum
-- ctags gives us: 'tags\tfile\tsource'
@@ -1098,12 +1098,6 @@ function make_entry.gen_from_ctags(opts)
tag, file, lnum = string.match(line, "([^\t]+)\t([^\t]+)\t(%d+).*")
end
-- append tag file path
if vim.opt.tagrelative:get() then
local tag_path = Path:new(tag_file):parent()
file = Path:new(tag_path .. "/" .. file):normalize(cwd)
end
if Path.path.sep == "\\" then
file = string.gsub(file, "/", "\\")
end