From 306e74482f0c2a1353aeebddf1dd61f4eee159da Mon Sep 17 00:00:00 2001 From: Anshuman Date: Fri, 31 May 2024 22:21:19 +0800 Subject: [PATCH] fix: deduplicate plugins when selecting multiple --- 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 eb853b5f..7d349d3a 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