summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorx1314aq <x1314aq@gmail.com>2021-10-19 23:59:54 +0800
committerGitHub <noreply@github.com>2021-10-19 17:59:54 +0200
commit9cad3a4a5d0e36b07b25c4be1db1c1306fcec945 (patch)
tree3d3065d75209f8e6ade2bc132d7ab521dcbced4a /lua
parentb5c63c6329cff8dd8e23047eecd1f581379f1587 (diff)
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.
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/make_entry.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua
index eaab12e..2328711 100644
--- a/lua/telescope/make_entry.lua
+++ b/lua/telescope/make_entry.lua
@@ -909,6 +909,10 @@ function make_entry.gen_from_ctags(opts)
tag, file, lnum = string.match(line, "([^\t]+)\t([^\t]+)\t(%d+).*")
end
+ if Path.path.sep == "\\" then
+ file = string.gsub(file, "/", "\\")
+ end
+
if opts.only_current_file and file ~= current_file then
return nil
end