From bb8a146c8249cfe2b64d1140e74fca3b92172d67 Mon Sep 17 00:00:00 2001 From: bekaboo <18127878294@qq.com> Date: Mon, 29 May 2023 00:32:31 -0500 Subject: [PATCH] fix(menu): dropbar_menu_entry_t separator losts metatable if merged with opts --- lua/dropbar/menu.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/dropbar/menu.lua b/lua/dropbar/menu.lua index 9da319eb..cea555da 100644 --- a/lua/dropbar/menu.lua +++ b/lua/dropbar/menu.lua @@ -33,9 +33,11 @@ function dropbar_menu_entry_t:new(opts) }), padding = configs.opts.menu.entry.padding, components = {}, - }, opts), + }, opts or {}), self ) + -- vim.tbl_deep_extend drops metatables + entry.separator = bar.dropbar_symbol_t:new(entry.separator) for idx, component in ipairs(entry.components) do component.entry = entry component.entry_idx = idx