Mercurial > vim
comparison runtime/plugin/matchparen.vim @ 706:ef3b59af4207
updated for version 7.0213
author | vimboss |
---|---|
date | Fri, 03 Mar 2006 22:50:42 +0000 |
parents | 8a99b25de218 |
children | 1babf94e0b24 |
comparison
equal
deleted
inserted
replaced
705:69e8006af734 | 706:ef3b59af4207 |
---|---|
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: 2006 Mar 02 | 3 " Last Change: 2006 Mar 03 |
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. |
81 let save_cursor = getpos('.') | 81 let save_cursor = getpos('.') |
82 call cursor(c_lnum, c_col - before) | 82 call cursor(c_lnum, c_col - before) |
83 endif | 83 endif |
84 let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | 84 let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) |
85 if before > 0 | 85 if before > 0 |
86 call cursor(save_cursor) | 86 call setpos('.', save_cursor) |
87 endif | 87 endif |
88 | 88 |
89 " If a match is found setup match highlighting. | 89 " If a match is found setup match highlighting. |
90 if m_lnum > 0 && m_lnum >= line('w0') && m_lnum <= line('w$') | 90 if m_lnum > 0 && m_lnum >= line('w0') && m_lnum <= line('w$') |
91 exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . | 91 exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . |