This commit is contained in:
@@ -296,10 +296,15 @@ function Renderer:_reconcile() -- {{{
|
||||
|
||||
--
|
||||
-- Step 2: reconcile extmarks:
|
||||
-- - You may be tempted to try to keep track of which extmarks are needed,
|
||||
-- and only delete those that are not needed. However, each time a tree is
|
||||
-- rendered, brand new extmarks are created. For simplicity, it is better to
|
||||
-- just delete all extmarks, and recreate them.
|
||||
--
|
||||
|
||||
-- Clear current extmarks:
|
||||
vim.api.nvim_buf_clear_namespace(self.bufnr, self.ns, 0, -1)
|
||||
|
||||
-- Set current extmarks:
|
||||
for _, extmark in ipairs(self.curr.extmarks) do
|
||||
extmark.id = vim.api.nvim_buf_set_extmark(
|
||||
|
||||
Reference in New Issue
Block a user