]> granicus.if.org Git - vim/commitdiff
Fix: With 'path' set to relative directory ":find" completion didn't work.
authorBram Moolenaar <Bram@vim.org>
Tue, 3 Aug 2010 20:11:29 +0000 (22:11 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 3 Aug 2010 20:11:29 +0000 (22:11 +0200)
(Nazri Ramliy)

src/misc1.c

index e564c5cec30f1fc8f16d714faa46a2b6f8735c90..bcf4ce7f83f67e09b27dbabe40daf07b1f4d0ab2 100644 (file)
@@ -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)