mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 12:20:02 -04:00
fix(highlight_current_scope): Ensure that detach is a inverse of attach
This commit is contained in:
parent
08f1a8561f
commit
23b4542218
1 changed files with 2 additions and 2 deletions
|
|
@ -37,8 +37,8 @@ function M.attach(bufnr)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.detach(bufnr)
|
function M.detach(bufnr)
|
||||||
M.clear_usage_highlights(bufnr)
|
M.clear_highlights(bufnr)
|
||||||
cmd(string.format('autocmd! NvimTreesitterCurrentScope_%d CursorHold', bufnr))
|
cmd(string.format('autocmd! NvimTreesitterCurrentScope_%d CursorMoved', bufnr))
|
||||||
cmd(string.format('autocmd! NvimTreesitterCurrentScope_%d BufLeave', bufnr))
|
cmd(string.format('autocmd! NvimTreesitterCurrentScope_%d BufLeave', bufnr))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue