We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24078ab commit 1cddf06Copy full SHA for 1cddf06
lua/range-highlight/init.lua
@@ -157,7 +157,9 @@ function M.setup(opts)
157
vim.api.nvim_create_autocmd({ "CmdlineChanged" }, {
158
pattern = "*",
159
callback = debounce(M.opts.debounce.wait, function(ev)
160
- vim.api.nvim_buf_clear_namespace(ev.buf, ns_id, 0, -1)
+ if vim.api.nvim_buf_is_valid(ev.buf) then
161
+ vim.api.nvim_buf_clear_namespace(ev.buf, ns_id, 0, -1)
162
+ end
163
164
local cmdline = vim.fn.getcmdline()
165
---@type integer|nil
0 commit comments