Skip to content

Commit bfc4bd3

Browse files
committed
fix(hints): clear extmarks before placing to prevent duplication on reload
1 parent 555d2d7 commit bfc4bd3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lua/coverage/hints.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ local function get_ns()
1313
end
1414

1515
--- Places virtual text hit counts for all open buffers in data.
16+
--- Clears any existing extmarks first to avoid duplication on reload.
1617
--- @param data CoverageData
1718
M.place = function(data)
19+
M.clear()
1820
local vt = config.opts.line_hits
1921
for fname, cov in pairs(data.files) do
2022
local bufnr = vim.fn.bufnr(fname, false)

0 commit comments

Comments
 (0)