Skip to content

Commit

Permalink
fix(bat): regression from d99996b (closes #1651)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Dec 29, 2024
1 parent 0194883 commit b4153da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lua/fzf-lua/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
-- "<none>" could be set by `autocmds`
if entry.path == "<none>" then return end
local fullpath = entry.bufname or entry.uri and entry.uri:match("^%a+://(.*)") or entry.path
Expand Down
4 changes: 2 additions & 2 deletions lua/fzf-lua/path.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b4153da

Please sign in to comment.