mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
fix(plugin): dont allow dir
changes when we already loaded files from the plugin's old dir. Show an error in this case. Fixes #993
This commit is contained in:
parent
3dc413d6fd
commit
c8e2091e6d
3 changed files with 13 additions and 2 deletions
|
@ -495,6 +495,7 @@ end
|
|||
function M.auto_load(modname, modpath)
|
||||
local plugin = Plugin.find(modpath)
|
||||
if plugin and modpath:find(plugin.dir, 1, true) == 1 then
|
||||
plugin._.rtp_loaded = true
|
||||
-- don't load if we're loading specs or if the plugin is already loaded
|
||||
if not (Plugin.loading or plugin._.loaded) then
|
||||
if plugin.module == false then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue