fix(ui): deduplicate plugins when selecting multiple (#1491)

This commit is contained in:
Anshuman Medhi 2024-05-31 22:28:33 +08:00 committed by GitHub
parent 4a8f813d81
commit b77aaa08cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -306,8 +306,12 @@ function M:setup_modes()
f, t = t, f f, t = t, f
end end
for i = f, t do for i = f, t do
plugins[#plugins + 1] = self.render:get_plugin(i) local plugin = self.render:get_plugin(i)
if plugin then
plugins[plugin.name] = plugin
end
end end
plugins = vim.tbl_values(plugins)
else else
plugins[1] = self.render:get_plugin() plugins[1] = self.render:get_plugin()
end end