mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 10:35:08 +02:00
fix(alpha): account for different icon byte sizes (#4130)
* fix(alpha): account for different icon byte sizes * chore: format
This commit is contained in:
parent
e9fbb801fb
commit
9efe4f25c3
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue