fix(pick): ignore registering the same picker

This commit is contained in:
Folke Lemaitre
2024-06-13 17:01:19 +02:00
parent 1d50c75a4b
commit 48a70aa8f5

View File

@ -32,7 +32,7 @@ function M.register(picker)
if vim.v.vim_did_enter == 1 then
return true
end
if M.picker then
if M.picker and M.picker.name ~= picker.name then
LazyVim.warn(
"`LazyVim.pick`: picker already set to `" .. M.picker.name .. "`,\nignoring new picker `" .. picker.name .. "`"
)