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.1.329 < prev    next >
Encoding:
Internet Message Format  |  2003-02-15  |  2.5 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.329
  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.1.329
  11. Problem:    When editing a file "a b c" replacing "%" in ":Cmd %" or ":next %"
  12.         does not work properly.  (Hari Krishna Dara)
  13. Solution:   Always escape spaces when expanding "%".  Don't split argument for
  14.         <f-args> in a user command when only one argument is used.
  15. Files:        src/ex_docmd.c
  16.  
  17.  
  18. *** ../vim61.328/src/ex_docmd.c    Sat Feb  1 16:43:17 2003
  19. --- src/ex_docmd.c    Sun Feb 16 22:07:15 2003
  20. ***************
  21. *** 3196,3205 ****
  22.           continue;
  23.       }
  24.   
  25. ! #ifdef UNIX
  26. !     /* For Unix there is a check for a single file name below.  Need to
  27. !      * escape white space et al. with a backslash. */
  28. !     if ((eap->argt & NOSPC) && !eap->usefilter)
  29.       {
  30.           char_u    *l;
  31.   
  32. --- 3203,3217 ----
  33.           continue;
  34.       }
  35.   
  36. !     /* Need to escape white space et al. with a backslash.  Don't do this
  37. !      * for shell commands (may have to use quotes instead).  Don't do this
  38. !      * for non-unix systems when there is a single argument (spaces don't
  39. !      * separate arguments then). */
  40. !     if (!eap->usefilter
  41. ! #ifndef UNIX
  42. !         && !(eap->argt & NOSPC)
  43. ! #endif
  44. !         )
  45.       {
  46.           char_u    *l;
  47.   
  48. ***************
  49. *** 3215,3221 ****
  50.               break;
  51.           }
  52.       }
  53. - #endif
  54.   
  55.       /* For a shell command a '!' must be escaped. */
  56.       if ((eap->usefilter || eap->cmdidx == CMD_bang)
  57. --- 3227,3232 ----
  58. ***************
  59. *** 4591,4596 ****
  60. --- 4602,4612 ----
  61.           break;
  62.       }
  63.   
  64. +     /* When specified there is a single argument don't split it.
  65. +      * Works for ":Cmd %" when % is "a b c". */
  66. +     if ((eap->argt & NOSPC) && quote == 2)
  67. +         quote = 1;
  68.       switch (quote)
  69.       {
  70.       case 0: /* No quoting, no splitting */
  71. *** ../vim61.328/src/version.c    Sun Feb 16 22:03:39 2003
  72. --- src/version.c    Sun Feb 16 22:05:05 2003
  73. ***************
  74. *** 608,609 ****
  75. --- 612,615 ----
  76.   {   /* Add new patch number below this line */
  77. + /**/
  78. +     329,
  79.   /**/
  80.  
  81. -- 
  82. hundred-and-one symptoms of being an internet addict:
  83. 269. You receive an e-mail from the wife of a deceased president, offering
  84.      to send you twenty million dollar, and you are not even surprised.
  85.  
  86.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  87. ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
  88. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  89.  \\\     Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///
  90.