comparison runtime/plugin/matchparen.vim @ 18489:1cd44535be32

Update runtime files. Commit: https://github.com/vim/vim/commit/1ff14ba24c4d85c008d7abe5e140dbb497ffea8d Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 2 14:09:23 2019 +0100 Update runtime files.
author Bram Moolenaar <Bram@vim.org>
date Sat, 02 Nov 2019 14:15:04 +0100
parents 1cfeee3ba4cd
children 59f93c2d2551
comparison
equal deleted inserted replaced
18488:1d7e6b677119 18489:1cd44535be32
1 " Vim plugin for showing matching parens 1 " Vim plugin for showing matching parens
2 " Maintainer: Bram Moolenaar <Bram@vim.org> 2 " Maintainer: Bram Moolenaar <Bram@vim.org>
3 " Last Change: 2018 Jul 3 3 " Last Change: 2019 Oct 28
4 4
5 " Exit quickly when: 5 " Exit quickly when:
6 " - this plugin was already loaded (or disabled) 6 " - this plugin was already loaded (or disabled)
7 " - when 'compatible' is set 7 " - when 'compatible' is set
8 " - the "CursorMoved" autocmd event is not available. 8 " - the "CursorMoved" autocmd event is not available.
34 let s:cpo_save = &cpo 34 let s:cpo_save = &cpo
35 set cpo-=C 35 set cpo-=C
36 36
37 " The function that is invoked (very often) to define a ":match" highlighting 37 " The function that is invoked (very often) to define a ":match" highlighting
38 " for any matching paren. 38 " for any matching paren.
39 function! s:Highlight_Matching_Pair() 39 func s:Highlight_Matching_Pair()
40 " Remove any previous match. 40 " Remove any previous match.
41 if exists('w:paren_hl_on') && w:paren_hl_on 41 if exists('w:paren_hl_on') && w:paren_hl_on
42 silent! call matchdelete(3) 42 silent! call matchdelete(3)
43 let w:paren_hl_on = 0 43 let w:paren_hl_on = 0
44 endif 44 endif
194 let w:paren_hl_on = 1 194 let w:paren_hl_on = 1
195 endif 195 endif
196 endfunction 196 endfunction
197 197
198 " Define commands that will disable and enable the plugin. 198 " Define commands that will disable and enable the plugin.
199 command! DoMatchParen call s:DoMatchParen() 199 command DoMatchParen call s:DoMatchParen()
200 command! NoMatchParen call s:NoMatchParen() 200 command NoMatchParen call s:NoMatchParen()
201 201
202 func! s:NoMatchParen() 202 func s:NoMatchParen()
203 let w = winnr() 203 let w = winnr()
204 noau windo silent! call matchdelete(3) 204 noau windo silent! call matchdelete(3)
205 unlet! g:loaded_matchparen 205 unlet! g:loaded_matchparen
206 exe "noau ". w . "wincmd w" 206 exe "noau ". w . "wincmd w"
207 au! matchparen 207 au! matchparen
208 endfunc 208 endfunc
209 209
210 func! s:DoMatchParen() 210 func s:DoMatchParen()
211 runtime plugin/matchparen.vim 211 runtime plugin/matchparen.vim
212 let w = winnr() 212 let w = winnr()
213 silent windo doau CursorMoved 213 silent windo doau CursorMoved
214 exe "noau ". w . "wincmd w" 214 exe "noau ". w . "wincmd w"
215 endfunc 215 endfunc