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 / 6.0.074 < prev    next >
Encoding:
Internet Message Format  |  2001-11-04  |  2.0 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.074
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.0.074
  11. Problem:    When using "&" in a substitute string a multi-byte character with
  12.         a trailbyte 0x5c is not handled correctly.
  13. Solution:   Recognize multi-byte characters inside the "&" part. (Muraoka Taro)
  14. Files:        src/regexp.c
  15.  
  16.  
  17. *** ../vim60.73/src/regexp.c    Wed Oct 31 15:17:54 2001
  18. --- src/regexp.c    Mon Nov  5 08:46:11 2001
  19. ***************
  20. *** 5403,5408 ****
  21. --- 5403,5412 ----
  22.   #ifdef FEAT_EVAL
  23.       static char_u *eval_result = NULL;
  24.   #endif
  25. + #ifdef FEAT_MBYTE
  26. +     int        l;
  27. + #endif
  28.   
  29.       /* Be paranoid... */
  30.       if (source == NULL || dest == NULL)
  31. ***************
  32. *** 5482,5491 ****
  33.       }
  34.       if (no < 0)          /* Ordinary character. */
  35.       {
  36. - #ifdef FEAT_MBYTE
  37. -         int l;
  38. - #endif
  39.           if (c == '\\' && *src != NUL)
  40.           {
  41.           /* Check for abbreviations -- webb */
  42. --- 5486,5491 ----
  43. ***************
  44. *** 5606,5611 ****
  45. --- 5606,5622 ----
  46.                   }
  47.                   dst += 2;
  48.               }
  49. + #ifdef FEAT_MBYTE
  50. +             else if (has_mbyte && (l = (*mb_ptr2len_check)(s)) > 1)
  51. +             {
  52. +                 /* TODO: should use "func" here. */
  53. +                 if (copy)
  54. +                 mch_memmove(dst, s, l);
  55. +                 dst    += l;
  56. +                 s += l - 1;
  57. +                 len    -= l - 1;
  58. +             }
  59. + #endif
  60.               else
  61.               {
  62.                   if (copy)
  63. *** ../vim60.73/src/version.c    Mon Nov  5 08:51:05 2001
  64. --- src/version.c    Mon Nov  5 08:50:40 2001
  65. ***************
  66. *** 608,609 ****
  67. --- 608,611 ----
  68.   {   /* Add new patch number below this line */
  69. + /**/
  70. +     74,
  71.   /**/
  72.  
  73. -- 
  74. Engineers understand that their appearance only bothers other people and
  75. therefore it is not worth optimizing.
  76.                 (Scott Adams - The Dilbert principle)
  77.  
  78.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  79. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  80.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  81.