mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 11:10:04 +08:00
fix(zettelkasten): use string.sub for long title
This commit is contained in:
parent
71c3ac19e0
commit
afe49af8a3
@ -20,8 +20,9 @@ local s_formatters = {
|
||||
['%h'] = function(line)
|
||||
if vim.fn.strdisplaywidth(line.title) <= 30 then
|
||||
return line.title .. string.rep(' ', 30 - vim.fn.strdisplaywidth(line.title))
|
||||
else
|
||||
return string.sub(line.title, 1, 27) .. '...'
|
||||
end
|
||||
return line.title
|
||||
end,
|
||||
['%d'] = function(line)
|
||||
return line.id
|
||||
|
Loading…
Reference in New Issue
Block a user