fix(picker.actions): check that plugin exists before loading it in help. Closes #1134

This commit is contained in:
Folke Lemaitre 2025-02-13 11:43:07 +01:00
parent 96796db21e
commit e326de9e0c
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -528,7 +528,7 @@ function M.help(picker, item, action)
local file = Snacks.picker.util.path(item) or ""
if package.loaded.lazy then
local plugin = file:match("/([^/]+)/doc/")
if plugin then
if plugin and require("lazy.core.config").plugins[plugin] then
require("lazy").load({ plugins = { plugin } })
end
end