feat: lazy caching now works with functions that have upvalues

This commit is contained in:
Folke Lemaitre 2022-11-25 15:35:40 +01:00
parent 48199f8031
commit fe33e4e3dd
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
9 changed files with 161 additions and 187 deletions

View file

@ -153,9 +153,9 @@ function M:reason(plugin)
if modname then
modname = modname:gsub("/", ".")
end
local pack = source:match("/([^/]-)/lua")
local name = source:match("/([^/]-)/lua")
for _, other in pairs(Config.plugins) do
if (modname and other.modname == modname) or (pack and other.pack == pack) then
if (modname and other.modname == modname) or (name and other.name == name) then
reason.plugin = other.name
reason.source = nil
break