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.124 < prev    next >
Encoding:
Internet Message Format  |  2002-01-09  |  4.8 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.124
  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.124
  11. Problem:    When using a ":substitute" command that starts with "\="
  12.             (evaluated as an expression), "~" was still replaced with the 
  13.             previous substitute string.
  14. Solution:   Skip the replacement when the substitute string starts with "\=".
  15.             Also adjust the documentation about doubling backslashes.
  16. Files:      src/ex_cmds.c, runtime/doc/change.txt
  17.  
  18.  
  19. *** ../vim60.123/src/ex_cmds.c    Wed Dec 12 21:42:23 2001
  20. --- src/ex_cmds.c    Thu Jan 10 19:27:31 2002
  21. ***************
  22. *** 3548,3555 ****
  23.       /*
  24.        * ~ in the substitute pattern is replaced with the old pattern.
  25.        * We do it here once to avoid it to be replaced over and over again.
  26.        */
  27. !     sub = regtilde(sub, p_magic);
  28.   
  29.       /*
  30.        * Check for a match on each line.
  31. --- 3548,3557 ----
  32.       /*
  33.        * ~ in the substitute pattern is replaced with the old pattern.
  34.        * We do it here once to avoid it to be replaced over and over again.
  35. +      * But don't do it when it starts with "\=", then it's an expression.
  36.        */
  37. !     if (!(sub[0] == '\\' && sub[1] == '='))
  38. !     sub = regtilde(sub, p_magic);
  39.   
  40.       /*
  41.        * Check for a match on each line.
  42. *** ../vim60.123/runtime/doc/change.txt    Tue Sep 25 21:40:33 2001
  43. --- runtime/doc/change.txt    Thu Jan 10 19:37:10 2002
  44. ***************
  45. *** 1,4 ****
  46. ! *change.txt*    For Vim version 6.0.  Last change: 2001 Sep 11
  47.   
  48.   
  49.             VIM REFERENCE MANUAL    by Bram Moolenaar
  50. --- 1,4 ----
  51. ! *change.txt*    For Vim version 6.0.  Last change: 2002 Jan 10
  52.   
  53.   
  54.             VIM REFERENCE MANUAL    by Bram Moolenaar
  55. ***************
  56. *** 640,651 ****
  57.   
  58.                           *sub-replace-special*
  59.   When the {string} starts with "\=" it is evaluated as an expression.  The
  60. ! special meaning for characters as mentioned below does not apply then.
  61. ! The whole matched text can be accessed with "submatch(0)".  The text matched
  62. ! with the first pair of () with "submatch(1)".  Likewise for further
  63.   sub-matches in ().
  64. ! Be careful: The separation character must not appear in the expression!
  65. ! Consider using a character like "@" or "|".
  66.   Example: >
  67.       :s@\n@\="\r" . expand("$HOME") . "\r"@
  68.   This replaces an end-of-line with a new line containing the value of $HOME.
  69. --- 640,655 ----
  70.   
  71.                           *sub-replace-special*
  72.   When the {string} starts with "\=" it is evaluated as an expression.  The
  73. ! special meaning for characters as mentioned below does not apply then, except
  74. ! "<CR>", "\<CR>" and "\\".  Thus in the result of the expression you need to
  75. ! use two backslashes get one, put a backslash before a <CR> you want to insert
  76. ! and use a <CR> without a backslash where you want to break the line.
  77. !    The whole matched text can be accessed with "submatch(0)".  The text
  78. ! matched with the first pair of () with "submatch(1)".  Likewise for further
  79.   sub-matches in ().
  80. !    Be careful: The separation character must not appear in the expression!
  81. ! Consider using a character like "@" or "|".  There is no problem if the result
  82. ! of the expression contains the separation character.
  83.   Example: >
  84.       :s@\n@\="\r" . expand("$HOME") . "\r"@
  85.   This replaces an end-of-line with a new line containing the value of $HOME.
  86. ***************
  87. *** 663,671 ****
  88.     ~      \~      replaced with the {string} of the previous substitute
  89.    \~       ~      replaced with ~ 
  90.         \u      next character made uppercase
  91. !       \U      following characters made uppercase
  92.         \l      next character made lowercase
  93. !       \L      following characters made lowercase
  94.         \e      end of \u, \U, \l and \L (NOTE: not <Esc>!)
  95.         \E      end of \u, \U, \l and \L
  96.         <CR>      split line in two at this point (Type the <CR> as CTRL-V
  97. --- 667,675 ----
  98.     ~      \~      replaced with the {string} of the previous substitute
  99.    \~       ~      replaced with ~ 
  100.         \u      next character made uppercase
  101. !       \U      following characters made uppercase, until \E
  102.         \l      next character made lowercase
  103. !       \L      following characters made lowercase, until \E
  104.         \e      end of \u, \U, \l and \L (NOTE: not <Esc>!)
  105.         \E      end of \u, \U, \l and \L
  106.         <CR>      split line in two at this point (Type the <CR> as CTRL-V
  107. *** ../vim60.123/src/version.c    Wed Jan  9 16:29:27 2002
  108. --- src/version.c    Thu Jan 10 19:38:14 2002
  109. ***************
  110. *** 608,609 ****
  111. --- 608,611 ----
  112.   {   /* Add new patch number below this line */
  113. + /**/
  114. +     124,
  115.   /**/
  116.  
  117. -- 
  118. A M00se once bit my sister ...
  119.                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
  120.  
  121.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  122. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  123.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  124.