diff options
author | Bram Moolenaar <Bram@vim.org> | 2008-01-06 19:07:36 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2008-01-06 19:07:36 +0000 |
commit | 76929293e03d4595c95171fc82be05a64673d42e (patch) | |
tree | e13452e87e1ca9773bf648f3a8438eb716ac2f82 /runtime/plugin | |
parent | 6203ff97b715e0112f90587f9ce576ef0e7798bc (diff) | |
download | vim-git-76929293e03d4595c95171fc82be05a64673d42e.tar.gz |
updated for version 7.1-211v7.1.211
Diffstat (limited to 'runtime/plugin')
-rw-r--r-- | runtime/plugin/matchparen.vim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim index e12ff6560..28bab7134 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: 2007 Aug 8 +" Last Change: 2008 Jan 06 " Exit quickly when: " - this plugin was already loaded (or disabled) @@ -111,7 +111,12 @@ function! s:Highlight_Matching_Pair() \ '=~? "string\\|character\\|singlequote\\|comment"' execute 'if' s_skip '| let s_skip = 0 | endif' - let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) + try + " Limit the search time to 500 msec to avoid a hang on very long lines. + let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, 500) + catch /E118/ + let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) + endtry if before > 0 call winrestview(save_cursor) |