# HG changeset patch # User Bram Moolenaar # Date 1355327038 -3600 # Node ID 9eb0d30510f7b02aa5f55f400bfab08d847ab447 # Parent 5da9ab575840b1579dd1b5cceacbad3333aeb595 updated for version 7.3.758 Problem: Matchit plugin does not handle space in #ifdef. Solution: Change matching pattern to allow spaces. (Mike Morearty) diff --git a/runtime/macros/matchit.vim b/runtime/macros/matchit.vim --- 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 diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -726,6 +726,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 758, +/**/ 757, /**/ 756,