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.4 / 7.4.360 < prev    next >
Encoding:
Internet Message Format  |  2014-07-08  |  2.4 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.360
  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.4.360
  11. Problem:    In a regexp pattern a "$" followed by \v or \V is not seen as the
  12.         end-of-line.
  13. Solution:   Handle the situation. (Ozaki Kiichi)
  14. Files:        src/regexp.c
  15.  
  16.  
  17. *** ../vim-7.4.359/src/regexp.c    2014-05-13 19:37:19.489786520 +0200
  18. --- src/regexp.c    2014-07-09 19:28:51.871683287 +0200
  19. ***************
  20. *** 3109,3123 ****
  21.           if (reg_magic >= MAGIC_OFF)
  22.           {
  23.           char_u *p = regparse + 1;
  24.   
  25. !         /* ignore \c \C \m and \M after '$' */
  26.           while (p[0] == '\\' && (p[1] == 'c' || p[1] == 'C'
  27. !                 || p[1] == 'm' || p[1] == 'M' || p[1] == 'Z'))
  28.               p += 2;
  29.           if (p[0] == NUL
  30.               || (p[0] == '\\'
  31.                   && (p[1] == '|' || p[1] == '&' || p[1] == ')'
  32.                   || p[1] == 'n'))
  33.               || reg_magic == MAGIC_ALL)
  34.               curchr = Magic('$');
  35.           }
  36. --- 3109,3133 ----
  37.           if (reg_magic >= MAGIC_OFF)
  38.           {
  39.           char_u *p = regparse + 1;
  40. +         int is_magic_all = (reg_magic == MAGIC_ALL);
  41.   
  42. !         /* ignore \c \C \m \M \v \V and \Z after '$' */
  43.           while (p[0] == '\\' && (p[1] == 'c' || p[1] == 'C'
  44. !                 || p[1] == 'm' || p[1] == 'M'
  45. !                 || p[1] == 'v' || p[1] == 'V' || p[1] == 'Z'))
  46. !         {
  47. !             if (p[1] == 'v')
  48. !             is_magic_all = TRUE;
  49. !             else if (p[1] == 'm' || p[1] == 'M' || p[1] == 'V')
  50. !             is_magic_all = FALSE;
  51.               p += 2;
  52. +         }
  53.           if (p[0] == NUL
  54.               || (p[0] == '\\'
  55.                   && (p[1] == '|' || p[1] == '&' || p[1] == ')'
  56.                   || p[1] == 'n'))
  57. +             || (is_magic_all
  58. +                    && (p[0] == '|' || p[0] == '&' || p[0] == ')'))
  59.               || reg_magic == MAGIC_ALL)
  60.               curchr = Magic('$');
  61.           }
  62. *** ../vim-7.4.359/src/version.c    2014-07-09 19:13:45.007701718 +0200
  63. --- src/version.c    2014-07-09 19:18:36.599695792 +0200
  64. ***************
  65. *** 736,737 ****
  66. --- 736,739 ----
  67.   {   /* Add new patch number below this line */
  68. + /**/
  69. +     360,
  70.   /**/
  71.  
  72. -- 
  73. An indication you must be a manager:
  74. You believe you never have any problems in your life, just
  75. "issues" and "improvement opportunities".
  76.  
  77.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  78. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  79. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  80.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  81.