diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-11-02 22:58:42 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-11-02 22:58:42 +0100 |
commit | 01164a6546b4c635daf96a1f17d1cb2d07f32a66 (patch) | |
tree | 6e3ff8b26170448c1ee8c53e904738ddc10287e8 /runtime/plugin | |
parent | ea84df8041dbbff95acb1db8532281679c5fbe5a (diff) |
Long overdue runtime update.
Diffstat (limited to 'runtime/plugin')
-rw-r--r-- | runtime/plugin/matchparen.vim | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim index 5db1f64c78..4f68fd87bc 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: 2016 Feb 16 +" Last Change: 2017 Sep 30 " Exit quickly when: " - this plugin was already loaded (or disabled) @@ -186,9 +186,23 @@ function! s:Highlight_Matching_Pair() endfunction " Define commands that will disable and enable the plugin. -command! NoMatchParen windo silent! call matchdelete(3) | unlet! g:loaded_matchparen | - \ au! matchparen -command! DoMatchParen runtime plugin/matchparen.vim | windo doau CursorMoved +command! DoMatchParen call s:DoMatchParen() +command! NoMatchParen call s:NoMatchParen() + +func! s:NoMatchParen() + let w = winnr() + noau windo silent! call matchdelete(3) + unlet! g:loaded_matchparen + exe "noau ". w . "wincmd w" + au! matchparen +endfunc + +func! s:DoMatchParen() + runtime plugin/matchparen.vim + let w = winnr() + silent windo doau CursorMoved + exe "noau ". w . "wincmd w" +endfunc let &cpo = s:cpo_save unlet s:cpo_save |