From 9cad3a4a5d0e36b07b25c4be1db1c1306fcec945 Mon Sep 17 00:00:00 2001 From: x1314aq Date: Tue, 19 Oct 2021 23:59:54 +0800 Subject: [PATCH] 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. --- lua/telescope/make_entry.lua | 4 ++++ 1 file changed, 4 insertions(+) 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