fix(image.inline): off-by-one for finding visible images at the last line of the buffer

This commit is contained in:
Folke Lemaitre 2025-10-30 09:12:24 +01:00
parent a9b57b2a7e
commit 04b3a54576
No known key found for this signature in database
GPG key ID: 9B52594D560070AB

View file

@ -70,7 +70,7 @@ end
---@param to number 1-indexed inclusive
function M:get(from, to)
local ret = {} ---@type table<number, snacks.image.Placement>
local marks = vim.api.nvim_buf_get_extmarks(self.buf, Snacks.image.placement.ns, { from - 1, 0 }, { to - 1, -1 }, {
local marks = vim.api.nvim_buf_get_extmarks(self.buf, Snacks.image.placement.ns, { from - 1, 0 }, { to, -1 }, {
overlap = true,
hl_name = false,
})