fix(picker.preview): off-by-one for cmd output

This commit is contained in:
Folke Lemaitre 2025-01-19 23:25:49 +01:00
parent f29f7a433a
commit da5556aa6b
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -145,7 +145,7 @@ function M.cmd(cmd, ctx, opts)
if opts.add then
opts.add(text, l)
else
vim.api.nvim_buf_set_lines(buf, -1, -1, false, { text })
vim.api.nvim_buf_set_lines(buf, l - 1, l, false, { text })
end
vim.bo[buf].modifiable = false
end