From e1f13f882ee9d504b22f520c1ac8bb1ac30b417a Mon Sep 17 00:00:00 2001 From: bhagwan Date: Sat, 5 Feb 2022 14:06:49 -0800 Subject: [PATCH] file actions: only parse ctags from tags|btags --- lua/fzf-lua/actions.lua | 2 +- lua/fzf-lua/providers/tags.lua | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/fzf-lua/actions.lua b/lua/fzf-lua/actions.lua index 2ec666a..bdedb7a 100644 --- a/lua/fzf-lua/actions.lua +++ b/lua/fzf-lua/actions.lua @@ -86,7 +86,7 @@ M.vimcmd_file = function(vimcmd, selected, opts) local is_term = utils.is_term_buffer(0) for i = 1, #selected do local entry = path.entry_to_file(selected[i], opts.cwd, opts.force_uri) - entry.ctag = path.entry_to_ctag(selected[i]) + entry.ctag = opts._ctag and path.entry_to_ctag(selected[i]) local fullpath = entry.path or entry.uri and entry.uri:match("^%a+://(.*)") if not path.starts_with_separator(fullpath) then fullpath = path.join({opts.cwd or vim.loop.cwd(), fullpath}) diff --git a/lua/fzf-lua/providers/tags.lua b/lua/fzf-lua/providers/tags.lua index 804b572..abf04db 100644 --- a/lua/fzf-lua/providers/tags.lua +++ b/lua/fzf-lua/providers/tags.lua @@ -139,6 +139,8 @@ local fzf_tags = function(opts) end)() end + -- signal actions this is a ctag + opts._ctag = true opts = core.set_header(opts, 2) opts = core.set_fzf_line_args(opts) return core.fzf_files(opts, contents)