mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2026-08-16 02:45:09 +00:00
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 https://github.com/neovim/neovim/blob/a1ed941a7881122fda2fd48e71e890ed55e4d08e/src/nvim/eval/funcs.c#L9845-L9858 Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
This commit is contained in:
co-authored by
Simon Hauser
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