Skip to content

Commit 988421c

Browse files
TheLeoPibhagwan
authored andcommitted
fix: correctly handle URIs without // after scheme
1 parent 9482523 commit 988421c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/fzf-lua/providers/lsp.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ local function location_handler(opts, cb, _, result, ctx, _)
9393
-- HACK: make sure target URI is valid for buggy LSPs (#1317)
9494
for i, x in ipairs(result) do
9595
for _, k in ipairs({ "uri", "targetUri" }) do
96-
if type(x[k]) == "string" and not x[k]:match("://") then
96+
if type(x[k]) == "string" and not x[k]:match("^([a-zA-Z]+[a-zA-Z0-9.+-]*):.*") then
9797
result[i][k] = "file://" .. result[i][k]
9898
end
9999
end

0 commit comments

Comments
 (0)