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
parent 772dca70ff
commit 9c8660c61e

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