From 0f4ca97bb7063c73897b8c55204456bb88cddc3b Mon Sep 17 00:00:00 2001 From: bhagwan Date: Fri, 21 Jan 2022 09:46:49 -0800 Subject: [PATCH] tags|btags: vim.fn.expand tags file, set cwd header (closes #322) --- lua/fzf-lua/providers/tags.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/fzf-lua/providers/tags.lua b/lua/fzf-lua/providers/tags.lua index 54e5efa..804b572 100644 --- a/lua/fzf-lua/providers/tags.lua +++ b/lua/fzf-lua/providers/tags.lua @@ -15,9 +15,9 @@ local get_grep_cmd = function() end local fzf_tags = function(opts) - opts.ctags_file = opts.ctags_file or "tags" + opts.ctags_file = opts.ctags_file and vim.fn.expand(opts.ctags_file) or "tags" - if not vim.loop.fs_open(vim.fn.expand(opts.ctags_file, true), "r", 438) then + if not vim.loop.fs_open(opts.ctags_file, "r", 438) then utils.info("Tags file does not exists. Create one with ctags -R") return end @@ -139,6 +139,7 @@ local fzf_tags = function(opts) end)() end + opts = core.set_header(opts, 2) opts = core.set_fzf_line_args(opts) return core.fzf_files(opts, contents) end