Karsten Hopp 088729
To: vim_dev@googlegroups.com
Karsten Hopp 088729
Subject: Patch 7.3.758
Karsten Hopp 088729
Fcc: outbox
Karsten Hopp 088729
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 088729
Mime-Version: 1.0
Karsten Hopp 088729
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 088729
Content-Transfer-Encoding: 8bit
Karsten Hopp 088729
------------
Karsten Hopp 088729
Karsten Hopp 088729
Patch 7.3.758
Karsten Hopp 088729
Problem:    Matchit plugin does not handle space in #ifdef.
Karsten Hopp 088729
Solution:   Change matching pattern to allow spaces. (Mike Morearty)
Karsten Hopp 088729
Files:	    runtime/macros/matchit.vim
Karsten Hopp 088729
Karsten Hopp 088729
Karsten Hopp 088729
*** ../vim-7.3.757/runtime/macros/matchit.vim	2010-08-15 21:57:19.000000000 +0200
Karsten Hopp 088729
--- runtime/macros/matchit.vim	2012-12-12 16:34:11.000000000 +0100
Karsten Hopp 088729
***************
Karsten Hopp 088729
*** 131,137 ****
Karsten Hopp 088729
      " let default = substitute(escape(&mps, '[$^.*~\\/?]'), '[,:]\+',
Karsten Hopp 088729
      "  \ '\\|', 'g').'\|\/\*\|\*\/\|#if\>\|#ifdef\>\|#else\>\|#elif\>\|#endif\>'
Karsten Hopp 088729
      let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
Karsten Hopp 088729
!       \ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>'
Karsten Hopp 088729
      " s:all = pattern with all the keywords
Karsten Hopp 088729
      let match_words = match_words . (strlen(match_words) ? "," : "") . default
Karsten Hopp 088729
      if match_words !~ s:notslash . '\\\d'
Karsten Hopp 088729
--- 131,137 ----
Karsten Hopp 088729
      " let default = substitute(escape(&mps, '[$^.*~\\/?]'), '[,:]\+',
Karsten Hopp 088729
      "  \ '\\|', 'g').'\|\/\*\|\*\/\|#if\>\|#ifdef\>\|#else\>\|#elif\>\|#endif\>'
Karsten Hopp 088729
      let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
Karsten Hopp 088729
!       \ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
Karsten Hopp 088729
      " s:all = pattern with all the keywords
Karsten Hopp 088729
      let match_words = match_words . (strlen(match_words) ? "," : "") . default
Karsten Hopp 088729
      if match_words !~ s:notslash . '\\\d'
Karsten Hopp 088729
***************
Karsten Hopp 088729
*** 649,655 ****
Karsten Hopp 088729
    "   s:all	regexp based on s:pat and the default groups
Karsten Hopp 088729
    " This part is copied and slightly modified from s:Match_wrapper().
Karsten Hopp 088729
    let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
Karsten Hopp 088729
!     \ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>'
Karsten Hopp 088729
    " Allow b:match_words = "GetVimMatchWords()" .
Karsten Hopp 088729
    if b:match_words =~ ":"
Karsten Hopp 088729
      let match_words = b:match_words
Karsten Hopp 088729
--- 649,655 ----
Karsten Hopp 088729
    "   s:all	regexp based on s:pat and the default groups
Karsten Hopp 088729
    " This part is copied and slightly modified from s:Match_wrapper().
Karsten Hopp 088729
    let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
Karsten Hopp 088729
!     \ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
Karsten Hopp 088729
    " Allow b:match_words = "GetVimMatchWords()" .
Karsten Hopp 088729
    if b:match_words =~ ":"
Karsten Hopp 088729
      let match_words = b:match_words
Karsten Hopp 088729
***************
Karsten Hopp 088729
*** 808,812 ****
Karsten Hopp 088729
--- 808,813 ----
Karsten Hopp 088729
  endfun
Karsten Hopp 088729
  
Karsten Hopp 088729
  let &cpo = s:save_cpo
Karsten Hopp 088729
+ unlet s:save_cpo
Karsten Hopp 088729
  
Karsten Hopp 088729
  " vim:sts=2:sw=2:
Karsten Hopp 088729
*** ../vim-7.3.757/src/version.c	2012-12-12 16:11:28.000000000 +0100
Karsten Hopp 088729
--- src/version.c	2012-12-12 16:41:40.000000000 +0100
Karsten Hopp 088729
***************
Karsten Hopp 088729
*** 727,728 ****
Karsten Hopp 088729
--- 727,730 ----
Karsten Hopp 088729
  {   /* Add new patch number below this line */
Karsten Hopp 088729
+ /**/
Karsten Hopp 088729
+     758,
Karsten Hopp 088729
  /**/
Karsten Hopp 088729
Karsten Hopp 088729
-- 
Karsten Hopp 088729
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 088729
147. You finally give up smoking...because it made the monitor dirty.
Karsten Hopp 088729
Karsten Hopp 088729
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 088729
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 088729
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 088729
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///