Mercurial > vim
changeset 4007:9eb0d30510f7 v7.3.758
updated for version 7.3.758
Problem: Matchit plugin does not handle space in #ifdef.
Solution: Change matching pattern to allow spaces. (Mike Morearty)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 12 Dec 2012 16:43:58 +0100 |
parents | 5da9ab575840 |
children | 1f372750f0ec |
files | runtime/macros/matchit.vim src/version.c |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/macros/matchit.vim +++ b/runtime/macros/matchit.vim @@ -131,7 +131,7 @@ function! s:Match_wrapper(word, forward, " let default = substitute(escape(&mps, '[$^.*~\\/?]'), '[,:]\+', " \ '\\|', 'g').'\|\/\*\|\*\/\|#if\>\|#ifdef\>\|#else\>\|#elif\>\|#endif\>' let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") . - \ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>' + \ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>' " s:all = pattern with all the keywords let match_words = match_words . (strlen(match_words) ? "," : "") . default if match_words !~ s:notslash . '\\\d' @@ -649,7 +649,7 @@ fun! s:MultiMatch(spflag, mode) " s:all regexp based on s:pat and the default groups " This part is copied and slightly modified from s:Match_wrapper(). let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") . - \ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>' + \ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>' " Allow b:match_words = "GetVimMatchWords()" . if b:match_words =~ ":" let match_words = b:match_words