diff --git a/lua/nvim-treesitter-refactor/highlight_current_scope.lua b/lua/nvim-treesitter-refactor/highlight_current_scope.lua index f2103a6..9ad7302 100644 --- a/lua/nvim-treesitter-refactor/highlight_current_scope.lua +++ b/lua/nvim-treesitter-refactor/highlight_current_scope.lua @@ -46,7 +46,7 @@ function M.attach(bufnr) -- luacheck: push ignore 631 cmd( string.format( - [[autocmd CursorMoved lua require'nvim-treesitter-refactor.highlight_current_scope'.highlight_current_scope(%d)]], + [[autocmd CursorMoved,WinScrolled lua require'nvim-treesitter-refactor.highlight_current_scope'.highlight_current_scope(%d)]], bufnr, bufnr )