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.796 < prev    next >
Encoding:
Internet Message Format  |  2013-01-29  |  3.0 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.796
  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.796
  11. Problem:    "/[^\n]" does match at a line break.
  12. Solution:   Make it do the same as "/.". (Christian Brabandt)
  13. Files:      src/regexp.c, src/testdir/test79.in, src/testdir/test79.ok
  14.  
  15.  
  16. *** ../vim-7.3.795/src/regexp.c    2013-01-30 13:59:31.000000000 +0100
  17. --- src/regexp.c    2013-01-30 18:16:12.000000000 +0100
  18. ***************
  19. *** 2397,2409 ****
  20.                   /* '\n' in range: also match NL */
  21.                   if (ret != JUST_CALC_SIZE)
  22.                   {
  23. !                 if (*ret == ANYBUT)
  24. !                     *ret = ANYBUT + ADD_NL;
  25. !                 else if (*ret == ANYOF)
  26.                       *ret = ANYOF + ADD_NL;
  27.                   /* else: must have had a \n already */
  28.                   }
  29. -                 *flagp |= HASNL;
  30.                   regparse++;
  31.                   startc = -1;
  32.               }
  33. --- 2397,2411 ----
  34.                   /* '\n' in range: also match NL */
  35.                   if (ret != JUST_CALC_SIZE)
  36.                   {
  37. !                 /* Using \n inside [^] does not change what
  38. !                  * matches. "[^\n]" is the same as ".". */
  39. !                 if (*ret == ANYOF)
  40. !                 {
  41.                       *ret = ANYOF + ADD_NL;
  42. +                     *flagp |= HASNL;
  43. +                 }
  44.                   /* else: must have had a \n already */
  45.                   }
  46.                   regparse++;
  47.                   startc = -1;
  48.               }
  49. ***************
  50. *** 4344,4349 ****
  51. --- 4346,4352 ----
  52.           break; /* Matched with EOW */
  53.   
  54.         case ANY:
  55. +         /* ANY does not match new lines. */
  56.           if (c == NUL)
  57.           status = RA_NOMATCH;
  58.           else
  59. *** ../vim-7.3.795/src/testdir/test79.in    2011-06-19 04:31:54.000000000 +0200
  60. --- src/testdir/test79.in    2013-01-30 17:56:11.000000000 +0100
  61. ***************
  62. *** 201,211 ****
  63. --- 201,215 ----
  64.   /^TEST/
  65.   j:s/A./\=submatch(0)/
  66.   j:s/B./\=submatch(0)/
  67. + /^Q$
  68. + :s/Q[^\n]Q/\=submatch(0)."foobar"/
  69.   ENDTEST
  70.   
  71.   TEST_7:
  72.   A
  73. A
  74.   BB
  75. + Q
  76. + Q
  77.   
  78.   STARTTEST
  79.   :g/^STARTTEST/.,/^ENDTEST/d
  80. *** ../vim-7.3.795/src/testdir/test79.ok    2011-06-19 04:31:54.000000000 +0200
  81. --- src/testdir/test79.ok    2013-01-30 18:05:49.000000000 +0100
  82. ***************
  83. *** 115,118 ****
  84. --- 115,120 ----
  85.   A
  86.   B
  87.   B
  88. + Q
  89. + Q
  90.   
  91. *** ../vim-7.3.795/src/version.c    2013-01-30 17:41:43.000000000 +0100
  92. --- src/version.c    2013-01-30 18:19:22.000000000 +0100
  93. ***************
  94. *** 727,728 ****
  95. --- 727,730 ----
  96.   {   /* Add new patch number below this line */
  97. + /**/
  98. +     796,
  99.   /**/
  100.  
  101. -- 
  102. FATHER: We are here today to witness the union of two young people in the
  103.         joyful bond of the holy wedlock.  Unfortunately, one of them, my son
  104.         Herbert, has just fallen to his death.
  105.    [Murmurs from CROWD;  the BRIDE smiles with relief, coughs.]
  106.                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
  107.  
  108.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  109. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  110. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  111.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  112.