comparison runtime/plugin/matchparen.vim @ 1496:29c09fa57168 v7.1.211

updated for version 7.1-211
author vimboss
date Sun, 06 Jan 2008 19:07:36 +0000
parents 048f26eb43a3
children 1c597397f006
comparison
equal deleted inserted replaced
1495:04265ffbda1f 1496:29c09fa57168
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: 2007 Aug 8 3 " Last Change: 2008 Jan 06
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 availble. 8 " - the "CursorMoved" autocmd event is not availble.
109 " When not in a string or comment ignore matches inside them. 109 " When not in a string or comment ignore matches inside them.
110 let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' . 110 let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' .
111 \ '=~? "string\\|character\\|singlequote\\|comment"' 111 \ '=~? "string\\|character\\|singlequote\\|comment"'
112 execute 'if' s_skip '| let s_skip = 0 | endif' 112 execute 'if' s_skip '| let s_skip = 0 | endif'
113 113
114 let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) 114 try
115 " Limit the search time to 500 msec to avoid a hang on very long lines.
116 let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, 500)
117 catch /E118/
118 let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
119 endtry
115 120
116 if before > 0 121 if before > 0
117 call winrestview(save_cursor) 122 call winrestview(save_cursor)
118 endif 123 endif
119 124