fix(tags): wrong path separator on Windows (#1354)
the universal-ctags generates tag file in Unix path separator even on Windows platform, this PR fix this.
This commit is contained in:
@@ -909,6 +909,10 @@ function make_entry.gen_from_ctags(opts)
|
|||||||
tag, file, lnum = string.match(line, "([^\t]+)\t([^\t]+)\t(%d+).*")
|
tag, file, lnum = string.match(line, "([^\t]+)\t([^\t]+)\t(%d+).*")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if Path.path.sep == "\\" then
|
||||||
|
file = string.gsub(file, "/", "\\")
|
||||||
|
end
|
||||||
|
|
||||||
if opts.only_current_file and file ~= current_file then
|
if opts.only_current_file and file ~= current_file then
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user