fix(loader): when reloading, clear plugin properties cache (#1153)

See #445
This commit is contained in:
Serhii Karvatskyi 2023-10-25 21:00:50 +03:00 committed by GitHub
parent e42fccc3cd
commit 312e424a08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -216,6 +216,9 @@ function M.deactivate(plugin)
-- disable handlers
Handler.disable(plugin)
-- clear plugin properties cache
plugin._.cache = nil
-- remove loaded lua modules
Util.walkmods(plugin.dir .. "/lua", function(modname)
package.loaded[modname] = nil