fix: truncate for builtin.buffers

fix #2022
This commit is contained in:
Simon Hauser
2022-06-30 14:29:46 +02:00
parent 4ef490defa
commit 1ba967f84e
2 changed files with 6 additions and 2 deletions

View File

@@ -484,8 +484,9 @@ function make_entry.gen_from_buffer(opts)
local cwd = vim.fn.expand(opts.cwd or vim.loop.cwd())
local make_display = function(entry)
-- bufnr_width + modes + icon + 3 spaces + : + lnum
opts.__prefix = opts.bufnr_width + 4 + icon_width + 3 + 1 + #tostring(entry.lnum)
local display_bufname = utils.transform_path(opts, entry.filename)
local icon, hl_group = utils.get_devicons(entry.filename, disable_devicons)
return displayer {