From 1d1c5468f7f87bd800e707f1f537da65d299058a Mon Sep 17 00:00:00 2001 From: Will Leinweber Date: Wed, 18 Sep 2024 16:53:19 +0200 Subject: [PATCH] feat(`load`): take first module when multiple matches exist on the rtp (#94) --- lua/lz/n/spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lz/n/spec.lua b/lua/lz/n/spec.lua index 1db0655..64eb334 100644 --- a/lua/lz/n/spec.lua +++ b/lua/lz/n/spec.lua @@ -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