Skip to content

Commit

Permalink
fix: crash when LSP client workspace_folders is nil (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Jan 7, 2024
1 parent 49b2b3f commit c4cc824
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/oil/lsp/workspace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ local function get_matching_paths(client, filters, paths)

local workspace_folders = vim.tbl_map(function(folder)
return vim.uri_to_fname(folder.uri)
end, client.workspace_folders)
end, client.workspace_folders or {})
local function get_matching_workspace(path)
for _, workspace in ipairs(workspace_folders) do
if fs.is_subpath(workspace, path) then
Expand Down

0 comments on commit c4cc824

Please # to comment.