fix(highlight_current_scope): Ensure that detach is a inverse of attach

This commit is contained in:
Stephan Seitz 2020-08-31 18:31:15 +02:00 committed by Thomas Vigouroux
parent 08f1a8561f
commit 23b4542218

View file

@ -37,8 +37,8 @@ function M.attach(bufnr)
end
function M.detach(bufnr)
M.clear_usage_highlights(bufnr)
cmd(string.format('autocmd! NvimTreesitterCurrentScope_%d CursorHold', bufnr))
M.clear_highlights(bufnr)
cmd(string.format('autocmd! NvimTreesitterCurrentScope_%d CursorMoved', bufnr))
cmd(string.format('autocmd! NvimTreesitterCurrentScope_%d BufLeave', bufnr))
end