vim-patch:8.1.0143: matchit and matchparen don't handle E363

Problem:    Matchit and matchparen don't handle E363.
Solution:   Catch the E363 error. (Christian Brabandt)
3d1d6475f9
This commit is contained in:
Jan Edmund Lazo
2018-11-13 21:13:28 -05:00
parent 24ce4c6233
commit 091ae1e63f
2 changed files with 31 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
" matchit.vim: (global plugin) Extended "%" matching
" Last Change: 2017 Sep 15
" Last Change: 2018 Jul 3 by Christian Brabandt
" Maintainer: Benji Fisher PhD <benji@member.AMS.org>
" Version: 1.13.3, for Vim 6.3+
" Fix from Tommy Allen included.
@@ -268,7 +268,7 @@ function! s:Match_wrapper(word, forward, mode) range
" execute "normal!" . curcol . "l"
" endif
if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on"))
let skip = "0"
let skip = '0'
else
execute "if " . skip . "| let skip = '0' | endif"
endif
@@ -708,10 +708,16 @@ fun! s:MultiMatch(spflag, mode)
let openpat = substitute(openpat, ',', '\\|', 'g')
let closepat = substitute(close, '\(\\\@<!\(\\\\\)*\)\@<=\\(', '\\%(', 'g')
let closepat = substitute(closepat, ',', '\\|', 'g')
if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on"))
let skip = '0'
else
execute "if " . skip . "| let skip = '0' | endif"
try
execute "if " . skip . "| let skip = '0' | endif"
catch /^Vim\%((\a\+)\)\=:E363/
" We won't find anything, so skip searching, should keep Vim responsive.
return
endtry
endif
mark '
let level = v:count1