mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06: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)
|
---@param bufnr (integer|nil) Buffer to stop highlighting (default: current buffer)
|
||||||
function M.stop(bufnr)
|
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
|
if M.highlighter.active[bufnr] then
|
||||||
M.highlighter.active[bufnr]:destroy()
|
M.highlighter.active[bufnr]:destroy()
|
||||||
|
Loading…
Reference in New Issue
Block a user