]> granicus.if.org Git - vim/commitdiff
updated for version 7.1-195 v7.1.195
authorBram Moolenaar <Bram@vim.org>
Thu, 3 Jan 2008 19:22:13 +0000 (19:22 +0000)
committerBram Moolenaar <Bram@vim.org>
Thu, 3 Jan 2008 19:22:13 +0000 (19:22 +0000)
src/mark.c
src/version.c

index 764ad36ee69a8648dee41cd49470e35068c75e04..6dc593440c235278ba0b05a2896367330320dc8f 100644 (file)
@@ -505,9 +505,24 @@ fname2fnum(fm)
     {
        /*
         * First expand "~/" in the file name to the home directory.
-        * Try to shorten the file name.
+        * Don't expand the whole name, it may contain other '~' chars.
         */
-       expand_env(fm->fname, NameBuff, MAXPATHL);
+       if (fm->fname[0] == '~' && (fm->fname[1] == '/'
+#ifdef BACKSLASH_IN_FILENAME
+                   || fm->fname[1] == '\\'
+#endif
+                   ))
+       {
+           int len;
+
+           expand_env((char_u *)"~/", NameBuff, MAXPATHL);
+           len = STRLEN(NameBuff);
+           vim_strncpy(NameBuff + len, fm->fname + 2, MAXPATHL - len - 1);
+       }
+       else
+           vim_strncpy(NameBuff, fm->fname, MAXPATHL - 1);
+
+       /* Try to shorten the file name. */
        mch_dirname(IObuff, IOSIZE);
        p = shorten_fname(NameBuff, IObuff);
 
index 0c45c476b8fda948a0cdacd125c4154a3cf60793..d60f52d02d70d8efeb5d0b4008f3738e97dc9314 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    195,
 /**/
     194,
 /**/