fix(ui): show global marks in the correct buffer only

This commit is contained in:
Folke Lemaitre 2023-10-04 17:53:00 +02:00
parent 1abcffbfd9
commit 3849e0150b
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -19,7 +19,7 @@ function M.get_mark(buf, lnum)
local marks = vim.fn.getmarklist(buf)
vim.list_extend(marks, vim.fn.getmarklist())
for _, mark in ipairs(marks) do
if mark.pos[2] == lnum and mark.mark:match("[a-zA-Z]") then
if mark.pos[1] == buf and mark.pos[2] == lnum and mark.mark:match("[a-zA-Z]") then
return { text = mark.mark:sub(2), texthl = "DiagnosticHint" }
end
end