aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-29 10:17:57 +0800
committerGitHub <noreply@github.com>2022-11-29 10:17:57 +0800
commit65e8ed45de98bf93491c6740772f0a42834696ab (patch)
treee40c3905b1cc11ab5dee914ecc31916fb7967596 /runtime
parent615f124003376c007442319b31a172360796974c (diff)
downloadrneovim-65e8ed45de98bf93491c6740772f0a42834696ab.tar.gz
rneovim-65e8ed45de98bf93491c6740772f0a42834696ab.tar.bz2
rneovim-65e8ed45de98bf93491c6740772f0a42834696ab.zip
vim-patch:9.0.0969: matchparen highlight is not updated when switching buffers (#21227)
Problem: Matchparen highlight is not updated when switching buffers. Solution: Listen to the BufLeave and the BufWinEnter autocmd events. (closes vim/vim#11626) https://github.com/vim/vim/commit/28a896f54d4b2f2b4bef8ef4144dde1673c9d6e7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/plugin/matchparen.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim
index ce2225c5f8..eb4a9ecf7c 100644
--- a/runtime/plugin/matchparen.vim
+++ b/runtime/plugin/matchparen.vim
@@ -1,6 +1,6 @@
" Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2021 Apr 08
+" Last Change: 2022 Nov 28
" Exit quickly when:
" - this plugin was already loaded (or disabled)
@@ -19,8 +19,8 @@ endif
augroup matchparen
" Replace all matchparen autocommands
- autocmd! CursorMoved,CursorMovedI,WinEnter,WinScrolled * call s:Highlight_Matching_Pair()
- autocmd! WinLeave * call s:Remove_Matches()
+ autocmd! CursorMoved,CursorMovedI,WinEnter,BufWinEnter,WinScrolled * call s:Highlight_Matching_Pair()
+ autocmd! WinLeave,BufLeave * call s:Remove_Matches()
if exists('##TextChanged')
autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair()
endif