fix: Multi byte truncate for displayer (#464)
This is needed for calling strdisplaywidth() from Lua loop.
See https://github.com/nvim-telescope/telescope.nvim/issues/414
See a1ed941a78/src/nvim/eval/funcs.c (L9845-L9858)
Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
This commit is contained in:
committed by
GitHub
parent
4e0dfa2e70
commit
1ca1e7ccba
@@ -463,7 +463,8 @@ function make_entry.gen_from_buffer(opts)
|
||||
|
||||
local icon_width = 0
|
||||
if not disable_devicons then
|
||||
icon_width = vim.fn.strdisplaywidth(get_devicons('fname', disable_devicons))
|
||||
local icon, _ = get_devicons('fname', disable_devicons)
|
||||
icon_width = utils.strdisplaywidth(icon)
|
||||
end
|
||||
|
||||
local displayer = entry_display.create {
|
||||
|
||||
Reference in New Issue
Block a user