mirror of https://github.com/folke/lazy.nvim.git
fix(loader): fixed event check in reload. Fixes #1124
This commit is contained in:
parent
f73986546c
commit
cdfa788881
|
@ -259,8 +259,10 @@ function M.reload(plugin)
|
|||
load = true
|
||||
end
|
||||
|
||||
for _, event in ipairs(plugin.event or {}) do
|
||||
if event == "VimEnter" or event == "UIEnter" or event:find("VeryLazy") then
|
||||
local events = plugin._.handlers and plugin._.handlers.event and plugin._.handlers.event or {}
|
||||
|
||||
for _, event in pairs(events) do
|
||||
if event.id:find("VimEnter") or event.id:find("UIEnter") or event.id:find("VeryLazy") then
|
||||
load = true
|
||||
break
|
||||
end
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
---@field build? string|fun(self:LazyPlugin)|(string|fun(self:LazyPlugin))[]
|
||||
---@field opts? PluginOpts
|
||||
|
||||
---@class LazyPluginHandlers: {[string]: any}
|
||||
---@class LazyPluginHandlers
|
||||
---@field event? table<string,LazyEvent>
|
||||
---@field ft? table<string,LazyEvent>
|
||||
---@field keys? table<string,LazyKeys>
|
||||
|
|
Loading…
Reference in New Issue