mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 05:05:00 -07:00
fix(treesitter): stop() should treat 0 as current buffer #24450
This commit is contained in:
parent
78b56b21b4
commit
48085e40bb
@ -462,7 +462,7 @@ end
|
||||
---
|
||||
---@param bufnr (integer|nil) Buffer to stop highlighting (default: current buffer)
|
||||
function M.stop(bufnr)
|
||||
bufnr = bufnr or api.nvim_get_current_buf()
|
||||
bufnr = (bufnr and bufnr ~= 0) and bufnr or api.nvim_get_current_buf()
|
||||
|
||||
if M.highlighter.active[bufnr] then
|
||||
M.highlighter.active[bufnr]:destroy()
|
||||
|
Loading…
Reference in New Issue
Block a user