summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2008-01-03 19:22:13 +0000
committerBram Moolenaar <Bram@vim.org>2008-01-03 19:22:13 +0000
commit525ad4d05fe5df6d8d5b9c7daa5f5dcb91c3d9d8 (patch)
tree50997737b8121f3c4ffcf85bf83e7bfd94177961
parentb238909e065a6bf89821c3aef4e079d34222d18d (diff)
downloadvim-git-525ad4d05fe5df6d8d5b9c7daa5f5dcb91c3d9d8.tar.gz
updated for version 7.1-195v7.1.195
-rw-r--r--src/mark.c19
-rw-r--r--src/version.c2
2 files changed, 19 insertions, 2 deletions
diff --git a/src/mark.c b/src/mark.c
index 764ad36ee..6dc593440 100644
--- a/src/mark.c
+++ b/src/mark.c
@@ -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);
diff --git a/src/version.c b/src/version.c
index 0c45c476b..d60f52d02 100644
--- a/src/version.c
+++ b/src/version.c
@@ -667,6 +667,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 195,
+/**/
194,
/**/
193,