fix(picker.list): scores debug

This commit is contained in:
Folke Lemaitre 2025-01-16 08:36:48 +01:00
parent b5f7bbc0c9
commit 9499b944e7
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -350,7 +350,13 @@ function M:format(item)
if self.picker.opts.debug.scores then
local score = item.score and ("%.2f "):format(item.score) or "nil"
table.insert(line, 1, { score, "Number" })
parts[#parts + 1] = score
ret[#ret + 1] = {
col = selw,
end_col = selw + vim.api.nvim_strwidth(score),
hl_group = "Number",
}
selw = selw + vim.api.nvim_strwidth(score)
end
local col = selw