From b4153da4825f86c7dbc540c5fc238ccc8c24d75a Mon Sep 17 00:00:00 2001 From: bhagwan Date: Sun, 29 Dec 2024 12:32:50 -0800 Subject: [PATCH] fix(bat): regression from d99996b (closes #1651) --- lua/fzf-lua/actions.lua | 2 +- lua/fzf-lua/path.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/fzf-lua/actions.lua b/lua/fzf-lua/actions.lua index 5e4163ba..07f187f4 100644 --- a/lua/fzf-lua/actions.lua +++ b/lua/fzf-lua/actions.lua @@ -135,7 +135,7 @@ M.vimcmd_entry = function(_vimcmd, selected, opts, pcall_vimcmd) for i, sel in ipairs(selected) do (function() -- Lua 5.1 goto compatiblity hack (function wrap) - local entry = path.entry_to_file(sel, opts) + local entry = path.entry_to_file(sel, opts, opts._uri) -- "" could be set by `autocmds` if entry.path == "" then return end local fullpath = entry.bufname or entry.uri and entry.uri:match("^%a+://(.*)") or entry.path diff --git a/lua/fzf-lua/path.lua b/lua/fzf-lua/path.lua index 376ce0fd..52cff3fe 100644 --- a/lua/fzf-lua/path.lua +++ b/lua/fzf-lua/path.lua @@ -408,7 +408,7 @@ function M.entry_to_location(entry, opts) } end -function M.entry_to_file(entry, opts) +function M.entry_to_file(entry, opts, force_uri) opts = opts or {} if opts._fmt then if type(opts._fmt._from) == "function" then @@ -430,7 +430,7 @@ function M.entry_to_file(entry, opts) end --Force LSP jumps using `vim.lsp.util.show_document` so that LSP entries are --added to the tag stack (see `:help gettagstack`) - if not isURI and opts._uri then + if not isURI and force_uri then isURI = true stripped = "file://" .. stripped end