To: [email protected]
Subject: Patch 6.1a.015
Fcc: outbox
From: Bram Moolenaar <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 6.1a.015
Problem:    MS-Windows: When expanding a file name that contains a '[' or '{'
           an extra backslash is inserted. (Raul Segura Acevedo)
Solution:   Avoid adding the backslash.
Files:      src/ex_getln.c


*** ../vim61a.014/src/ex_getln.c        Fri Feb 22 11:13:20 2002
--- src/ex_getln.c      Thu Feb 28 21:20:51 2002
***************
*** 2647,2653 ****
--- 2647,2667 ----
 #endif
                   }
               }
+ #ifdef BACKSLASH_IN_FILENAME
+               {
+                   char_u      buf[20];
+                   int         j = 0;
+
+                   /* Don't escape '[' and '{' if they are in 'isfname'. */
+                   for (p = PATH_ESC_CHARS; *p != NUL; ++p)
+                       if ((*p != '[' && *p != '{') || !vim_isfilec(*p))
+                           buf[j++] = *p;
+                   buf[j] = NUL;
+                   p = vim_strsave_escaped(files[i], buf);
+               }
+ #else
               p = vim_strsave_escaped(files[i], PATH_ESC_CHARS);
+ #endif
               if (p != NULL)
               {
                   vim_free(files[i]);
*** ../vim61a.014/src/version.c Thu Feb 28 20:52:13 2002
--- src/version.c       Thu Feb 28 21:22:40 2002
***************
*** 608,609 ****
--- 608,611 ----
 {   /* Add new patch number below this line */
+ /**/
+     15,
 /**/

--
From "know your smileys":
O:-)   Saint

///  Bram Moolenaar -- [email protected] -- http://www.moolenaar.net  \\\
///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
\\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
\\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///