From 7671eec1065982cdf2ba4136beb1600fe1279431 Mon Sep 17 00:00:00 2001 From: Jakob Beckmann Date: Fri, 30 Aug 2024 22:09:15 +0200 Subject: [PATCH] feat: support more than a single character in bullets --- lua/headlines/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/headlines/init.lua b/lua/headlines/init.lua index d7aae01..88068d0 100644 --- a/lua/headlines/init.lua +++ b/lua/headlines/init.lua @@ -281,7 +281,7 @@ M.refresh = function() local virt_text = {} if c.bullets and #c.bullets > 0 then local bullet = c.bullets[((level - 1) % #c.bullets) + 1] - virt_text[1] = { string.rep(" ", level - 1) .. bullet, { hl_group, bullet_hl_group } } + virt_text[1] = { string.rep(" ", level - vim.fn.strwidth(bullet)) .. bullet, { hl_group, bullet_hl_group } } end nvim_buf_set_extmark(bufnr, M.namespace, start_row, 0, {