mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-10 09:24:37 +02:00
fix(ui): always pad to 2 cells for status column icons. Fixes #1571
This commit is contained in:
parent
e08813fa11
commit
6cf6b0a624
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ end
|
||||||
---@param len? number
|
---@param len? number
|
||||||
function M.icon(sign, len)
|
function M.icon(sign, len)
|
||||||
sign = sign or {}
|
sign = sign or {}
|
||||||
len = len or 1
|
len = len or 2
|
||||||
local text = vim.fn.strcharpart(sign.text or "", 0, len) ---@type string
|
local text = vim.fn.strcharpart(sign.text or "", 0, len) ---@type string
|
||||||
text = text .. string.rep(" ", len - vim.fn.strchars(text))
|
text = text .. string.rep(" ", len - vim.fn.strchars(text))
|
||||||
return sign.texthl and ("%#" .. sign.texthl .. "#" .. text .. "%*") or text
|
return sign.texthl and ("%#" .. sign.texthl .. "#" .. text .. "%*") or text
|
||||||
|
@ -71,7 +71,7 @@ function M.statuscolumn()
|
||||||
M.icon(left),
|
M.icon(left),
|
||||||
[[%=]],
|
[[%=]],
|
||||||
nu .. " ",
|
nu .. " ",
|
||||||
M.icon(fold or right, 2),
|
M.icon(fold or right),
|
||||||
}, "")
|
}, "")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue