changeset 2476:6be86488996b vim73

Fix: With 'path' set to relative directory ":find" completion didn't work. (Nazri Ramliy)
author Bram Moolenaar <bram@vim.org>
date Tue, 03 Aug 2010 22:11:29 +0200
parents 7d1044b27eb5
children 81bf2aaa979a
files src/misc1.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -9347,8 +9347,13 @@ expand_path_option(curdir, gap)
 		continue;
 	    STRMOVE(buf + curdir_len + 1, buf);
 	    STRCPY(buf, curdir);
-	    add_pathsep(buf);
-	    STRMOVE(buf + curdir_len, buf + curdir_len + 1);
+	    buf[curdir_len] = PATHSEP;
+	    /*
+	     * 'path' may have "./baz" as one of the items.
+	     * If curdir is "/foo/bar", p will end up being "/foo/bar/./baz".
+	     * Simplify it.
+	     */
+	    simplify_filename(buf);
 	}
 
 	if (ga_grow(gap, 1) == FAIL)