summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@zimbu.org>2010-03-23 18:06:52 +0100
committerBram Moolenaar <bram@zimbu.org>2010-03-23 18:06:52 +0100
commit880bf528e0b37805ce9c31996586c30ac9adb8f7 (patch)
treee523b09881dd94a2f16521262a2bcb16ef00dbd5
parent11fde25e67fb0a05b33cb43fb37ea8b8918fc2df (diff)
downloadvim-880bf528e0b37805ce9c31996586c30ac9adb8f7.tar.gz
updated for version 7.2.410v7.2.410v7-2-410
Problem: Highlighting directories for completion doesn't work properly. Solution: Don't halve backslashes when not needed, expaned "~/". (Dominique Pelle)
-rw-r--r--src/ex_getln.c24
-rw-r--r--src/version.c2
2 files changed, 21 insertions, 5 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index dea4b134..6e74a23f 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -3948,12 +3948,26 @@ showmatches(xp, wildmenu)
|| xp->xp_context == EXPAND_SHELLCMD
|| xp->xp_context == EXPAND_BUFFERS)
{
- char_u *halved_slash;
-
/* highlight directories */
- halved_slash = backslash_halve_save(files_found[k]);
- j = mch_isdir(halved_slash);
- vim_free(halved_slash);
+ if (xp->xp_numfiles != -1)
+ {
+ char_u *halved_slash;
+ char_u *exp_path;
+
+ /* Expansion was done before and special characters
+ * were escaped, need to halve backslashes. Also
+ * $HOME has been replaced with ~/. */
+ exp_path = expand_env_save_opt(files_found[k], TRUE);
+ halved_slash = backslash_halve_save(
+ exp_path != NULL ? exp_path : files_found[k]);
+ j = mch_isdir(halved_slash != NULL ? halved_slash
+ : files_found[k]);
+ vim_free(exp_path);
+ vim_free(halved_slash);
+ }
+ else
+ /* Expansion was done here, file names are literal. */
+ j = mch_isdir(files_found[k]);
if (showtail)
p = L_SHOWFILE(k);
else
diff --git a/src/version.c b/src/version.c
index 5d340614..9cff4cea 100644
--- a/src/version.c
+++ b/src/version.c
@@ -682,6 +682,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 410,
+/**/
409,
/**/
408,