mirror of
https://github.com/neovim/neovim.git
synced 2026-01-04 10:26:42 +10:00
perf(extmarks): better track whether namespace has extmarks (#28615)
This avoids redraw when adding/removing an empty namespace for a window. This also avoids marktree traversal when clearing a namespace that has already been cleared, which is added as a benchmark.
This commit is contained in:
@@ -129,13 +129,13 @@ function M.on_yank(opts)
|
||||
yank_cancel()
|
||||
end
|
||||
|
||||
vim.api.nvim_win_add_ns(winid, yank_ns)
|
||||
M.range(bufnr, yank_ns, higroup, "'[", "']", {
|
||||
regtype = event.regtype,
|
||||
inclusive = event.inclusive,
|
||||
priority = opts.priority or M.priorities.user,
|
||||
_scoped = true,
|
||||
})
|
||||
vim.api.nvim_win_add_ns(winid, yank_ns)
|
||||
|
||||
yank_cancel = function()
|
||||
yank_timer = nil
|
||||
|
||||
Reference in New Issue
Block a user