From b77aaa08cb5b178ed8662765caa41c70ff254a4c Mon Sep 17 00:00:00 2001 From: Anshuman Medhi Date: Fri, 31 May 2024 22:28:33 +0800 Subject: [PATCH] fix(ui): deduplicate plugins when selecting multiple (#1491) --- lua/lazy/view/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lazy/view/init.lua b/lua/lazy/view/init.lua index eb853b5..7d349d3 100644 --- a/lua/lazy/view/init.lua +++ b/lua/lazy/view/init.lua @@ -306,8 +306,12 @@ function M:setup_modes() f, t = t, f end 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 + plugins = vim.tbl_values(plugins) else plugins[1] = self.render:get_plugin() end