diff runtime/plugin/matchparen.vim @ 29840:b15334beeaa4

Update runtime files Commit: https://github.com/vim/vim/commit/fd999452adaf529a30d78844b5fbee355943da29 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 24 18:30:14 2022 +0100 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Wed, 24 Aug 2022 19:45:05 +0200
parents 9f41bfdbc6fc
children 985a3d6e1d4b
line wrap: on
line diff
--- a/runtime/plugin/matchparen.vim
+++ b/runtime/plugin/matchparen.vim
@@ -5,8 +5,7 @@
 " Exit quickly when:
 " - this plugin was already loaded (or disabled)
 " - when 'compatible' is set
-" - the "CursorMoved" autocmd event is not available.
-if exists("g:loaded_matchparen") || &cp || !exists("##CursorMoved")
+if exists("g:loaded_matchparen") || &cp
   finish
 endif
 let g:loaded_matchparen = 1
@@ -20,7 +19,7 @@ endif
 
 augroup matchparen
   " Replace all matchparen autocommands
-  autocmd! CursorMoved,CursorMovedI,WinEnter * call s:Highlight_Matching_Pair()
+  autocmd! CursorMoved,CursorMovedI,WinEnter,WinScrolled * call s:Highlight_Matching_Pair()
   autocmd! WinLeave * call s:Remove_Matches()
   if exists('##TextChanged')
     autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair()