diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2018-11-14 11:27:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-14 11:27:17 +0100 |
| commit | e14fa8569cea4164bb4953a0368a94686fbd47e5 (patch) | |
| tree | d40f53b598f1c249a606fb2e98b331ec0f9d9533 /runtime/plugin/matchit.vim | |
| parent | 05f9c7c2f7f52a5b4b1a72a49dab99dc21195c7d (diff) | |
| parent | f6c6567cb1bbc14750e487907b19eb59ce79434c (diff) | |
| download | rneovim-e14fa8569cea4164bb4953a0368a94686fbd47e5.tar.gz rneovim-e14fa8569cea4164bb4953a0368a94686fbd47e5.tar.bz2 rneovim-e14fa8569cea4164bb4953a0368a94686fbd47e5.zip | |
Merge #9231 'vim-patch:8.1.{115,143,311,352}'
Diffstat (limited to 'runtime/plugin/matchit.vim')
| -rw-r--r-- | runtime/plugin/matchit.vim | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/runtime/plugin/matchit.vim b/runtime/plugin/matchit.vim index e3171e5cbb..3b0a8112dc 100644 --- a/runtime/plugin/matchit.vim +++ b/runtime/plugin/matchit.vim @@ -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 |