|
@@ -36,6 +36,9 @@ local function resolve_buttons(theme_name, button_section)
|
|
|
-- this became necessary after recent changes in alpha.nvim (06ade3a20ca9e79a7038b98d05a23d7b6c016174)
|
|
|
button_element.on_press = on_press
|
|
|
|
|
|
+ -- account for different icon byte sizes in cursor offset
|
|
|
+ local _, icon_length = button_element.val:find "[\128-\255]*"
|
|
|
+ button_element.opts.cursor = icon_length + 2
|
|
|
button_element.opts = vim.tbl_extend("force", button_element.opts, entry[4] or button_section.opts or {})
|
|
|
|
|
|
table.insert(val, button_element)
|