feat(load): take first module when multiple matches exist on the rtp (#94)

This commit is contained in:
Will Leinweber
2024-09-18 16:53:19 +02:00
committed by GitHub
parent ceb1979385
commit 1d1c5468f7
+1 -1
View File
@@ -50,7 +50,7 @@ local function import_spec(spec, result)
import_modname(modname, result)
end
local import_dir = vim.api.nvim_get_runtime_file(vim.fs.joinpath("lua", modname), true)
if #import_dir == 1 then
if #import_dir > 0 then
local dir = import_dir[1]
local handle = vim.uv.fs_scandir(dir)
while handle do