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 / old / 5.5.054 < prev    next >
Encoding:
Internet Message Format  |  1999-12-04  |  2.0 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 5.5.054
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. ------------
  6.  
  7. Patch 5.5.054 
  8. Problem:    Unix: ":e #" doesn't work if the alternate file name contains a
  9.             space or backslash. (Hudacek)
  10. Solution:   When replacing "#", "%" or other items that stand for a file name,
  11.             prepend a backslash before special characters.
  12. Files:      src/ex_docmd.c
  13.  
  14.  
  15. *** ../vim-5.5.53/src/ex_docmd.c    Tue Oct 12 19:37:16 1999
  16. --- src/ex_docmd.c    Sun Dec  5 15:52:03 1999
  17. ***************
  18. *** 3369,3374 ****
  19. --- 3369,3395 ----
  20.           continue;
  21.       }
  22.   
  23. + #ifdef UNIX
  24. +     /* For Unix there is a check for a single file name below.  Need to
  25. +      * escape white space et al. with a backslash. */
  26. +     if ((eap->argt & NOSPC) && !eap->usefilter)
  27. +     {
  28. +         char_u    *l;
  29. +         for (l = repl; *l; ++l)
  30. +         if (vim_strchr(escape_chars, *l) != NULL)
  31. +         {
  32. +             l = vim_strsave_escaped(repl, escape_chars);
  33. +             if (l != NULL)
  34. +             {
  35. +             vim_free(repl);
  36. +             repl = l;
  37. +             }
  38. +             break;
  39. +         }
  40. +     }
  41. + #endif
  42.       p = repl_cmdline(eap, p, srclen, repl, cmdlinep);
  43.       vim_free(repl);
  44.       if (p == NULL)
  45. ***************
  46. *** 3390,3396 ****
  47.       {
  48.           if (n == 2)
  49.           {
  50. ! #if defined(UNIX)
  51.           /*
  52.            * Only for Unix we check for more than one file name.
  53.            * For other systems spaces are considered to be part
  54. --- 3411,3417 ----
  55.       {
  56.           if (n == 2)
  57.           {
  58. ! #ifdef UNIX
  59.           /*
  60.            * Only for Unix we check for more than one file name.
  61.            * For other systems spaces are considered to be part
  62. *** ../vim-5.5.53/src/version.c    Sun Dec  5 15:57:56 1999
  63. --- src/version.c    Sun Dec  5 15:57:36 1999
  64. ***************
  65. *** 420,420 ****
  66. --- 420,421 ----
  67.   {   /* Add new patch number below this line */
  68. +     54,
  69.  
  70. -- 
  71. hundred-and-one symptoms of being an internet addict:
  72. 244. You use more than 20 passwords.
  73.  
  74. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
  75.   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /
  76.