diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-11-07 01:05:23 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-11-07 01:08:51 +0100 |
commit | 8c6a92c6e2af2d5025b1be994802d61f39af2b9e (patch) | |
tree | f30af80d9205cdec7e8493bca332d4da771f40a2 /runtime/plugin | |
parent | 0312fc2ddb4144a2fd0d323d742c41f625405420 (diff) | |
download | rneovim-8c6a92c6e2af2d5025b1be994802d61f39af2b9e.tar.gz rneovim-8c6a92c6e2af2d5025b1be994802d61f39af2b9e.tar.bz2 rneovim-8c6a92c6e2af2d5025b1be994802d61f39af2b9e.zip |
vim-patch:e0720cbf63eb
Update runtime files.
https://github.com/vim/vim/commit/e0720cbf63eb3045be8d965e3182c0c392c7b5e9
Diffstat (limited to 'runtime/plugin')
-rw-r--r-- | runtime/plugin/matchit.vim | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/runtime/plugin/matchit.vim b/runtime/plugin/matchit.vim index f275f7b36d..a73b063766 100644 --- a/runtime/plugin/matchit.vim +++ b/runtime/plugin/matchit.vim @@ -1,7 +1,7 @@ " matchit.vim: (global plugin) Extended "%" matching -" Last Change: 2016 Aug 21 +" Last Change: 2017 March 26 " Maintainer: Benji Fisher PhD <benji@member.AMS.org> -" Version: 1.13.2, for Vim 6.3+ +" Version: 1.13.3, for Vim 6.3+ " Fix from Tommy Allen included. " Fix from Fernando Torres included. " Improvement from Ken Takata included. @@ -90,12 +90,15 @@ let s:notslash = '\\\@<!\%(\\\\\)*' function! s:Match_wrapper(word, forward, mode) range " In s:CleanUp(), :execute "set" restore_options . - let restore_options = (&ic ? " " : " no") . "ignorecase" - if exists("b:match_ignorecase") + let restore_options = "" + if exists("b:match_ignorecase") && b:match_ignorecase != &ic + let restore_options .= (&ic ? " " : " no") . "ignorecase" let &ignorecase = b:match_ignorecase endif - let restore_options = " ve=" . &ve . restore_options - set ve= + if &ve != '' + let restore_options = " ve=" . &ve . restore_options + set ve= + endif " If this function was called from Visual mode, make sure that the cursor " is at the correct end of the Visual range: if a:mode == "v" @@ -283,7 +286,9 @@ endfun " Restore options and do some special handling for Operator-pending mode. " The optional argument is the tail of the matching group. fun! s:CleanUp(options, mode, startline, startcol, ...) - execute "set" a:options + if strlen(a:options) + execute "set" a:options + endif " Open folds, if appropriate. if a:mode != "o" if &foldopen =~ "percent" @@ -635,8 +640,9 @@ fun! s:MultiMatch(spflag, mode) if !exists("b:match_words") || b:match_words == "" return {} end - let restore_options = (&ic ? "" : "no") . "ignorecase" - if exists("b:match_ignorecase") + let restore_options = "" + if exists("b:match_ignorecase") && b:match_ignorecase != &ic + let restore_options .= (&ic ? " " : " no") . "ignorecase" let &ignorecase = b:match_ignorecase endif let startline = line(".") |