perf(ui): clear existing extmarks before rendering

This commit is contained in:
Folke Lemaitre 2022-12-20 20:53:00 +01:00
parent ffcd0ab7bb
commit 06ac8bda66
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 1 additions and 0 deletions

View File

@ -65,6 +65,7 @@ function Text:render(buf)
end
vim.api.nvim_buf_set_lines(buf, 0, -1, false, lines)
vim.api.nvim_buf_clear_namespace(buf, Config.ns, 0, -1)
for l, line in ipairs(self._lines) do
local col = self.padding