home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.3 / 7.3.1217 < prev    next >
Encoding:
Internet Message Format  |  2013-06-16  |  2.7 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.1217
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.1217
  11. Problem:    New regexp engine: Can't handle \%[[ao]]. (Yukihiro Nakadaira)
  12. Solution:   Support nested atoms inside \%[].
  13. Files:        src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok
  14.  
  15.  
  16. *** ../vim-7.3.1216/src/regexp_nfa.c    2013-06-16 22:49:09.000000000 +0200
  17. --- src/regexp_nfa.c    2013-06-17 21:27:03.000000000 +0200
  18. ***************
  19. *** 1150,1162 ****
  20.               int        n;
  21.   
  22.               /* \%[abc] */
  23. !             for (n = 0; (c = getchr()) != ']'; ++n)
  24.               {
  25.                   if (c == NUL)
  26.                   EMSG2_RET_FAIL(_(e_missing_sb),
  27.                                 reg_magic == MAGIC_ALL);
  28. !                 EMIT(c);
  29.               }
  30.               if (n == 0)
  31.                   EMSG2_RET_FAIL(_(e_empty_sb),
  32.                                 reg_magic == MAGIC_ALL);
  33. --- 1150,1165 ----
  34.               int        n;
  35.   
  36.               /* \%[abc] */
  37. !             for (n = 0; (c = peekchr()) != ']'; ++n)
  38.               {
  39.                   if (c == NUL)
  40.                   EMSG2_RET_FAIL(_(e_missing_sb),
  41.                                 reg_magic == MAGIC_ALL);
  42. !                 /* recursive call! */
  43. !                 if (nfa_regatom() == FAIL)
  44. !                 return FAIL;
  45.               }
  46. +             getchr();  /* get the ] */
  47.               if (n == 0)
  48.                   EMSG2_RET_FAIL(_(e_empty_sb),
  49.                                 reg_magic == MAGIC_ALL);
  50. *** ../vim-7.3.1216/src/testdir/test64.in    2013-06-16 15:43:43.000000000 +0200
  51. --- src/testdir/test64.in    2013-06-17 21:21:35.000000000 +0200
  52. ***************
  53. *** 366,371 ****
  54. --- 366,372 ----
  55.   :call add(tl, [2, '\%[bar]x', 'barxx', 'barx'])
  56.   :call add(tl, [2, '\%[bar]x', 'bxx', 'bx'])
  57.   :call add(tl, [2, '\%[bar]x', 'xxx', 'x'])
  58. + :call add(tl, [2, 'b\%[[ao]r]', 'bar bor', 'bar'])
  59.   :"
  60.   :"""" Alternatives, must use first longest match
  61.   :call add(tl, [2, 'goo\|go', 'google', 'goo'])
  62. *** ../vim-7.3.1216/src/testdir/test64.ok    2013-06-16 15:43:43.000000000 +0200
  63. --- src/testdir/test64.ok    2013-06-17 21:27:09.000000000 +0200
  64. ***************
  65. *** 836,841 ****
  66. --- 836,844 ----
  67.   OK 0 - \%[bar]x
  68.   OK 1 - \%[bar]x
  69.   OK 2 - \%[bar]x
  70. + OK 0 - b\%[[ao]r]
  71. + OK 1 - b\%[[ao]r]
  72. + OK 2 - b\%[[ao]r]
  73.   OK 0 - goo\|go
  74.   OK 1 - goo\|go
  75.   OK 2 - goo\|go
  76. *** ../vim-7.3.1216/src/version.c    2013-06-17 20:27:13.000000000 +0200
  77. --- src/version.c    2013-06-17 21:20:10.000000000 +0200
  78. ***************
  79. *** 730,731 ****
  80. --- 730,733 ----
  81.   {   /* Add new patch number below this line */
  82. + /**/
  83. +     1217,
  84.   /**/
  85.  
  86.  
  87. -- 
  88. Marriage isn't a word.  It's a sentence.
  89.  
  90.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  91. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  92. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  93.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  94.