On Mon, Aug 09, 2010 at 07:37:13PM -0400, James Vega wrote: > On Sun, Aug 08, 2010 at 11:12:01PM -0400, James Vega wrote: > > On Mon, Aug 09, 2010 at 09:28:01AM +0800, Nazri Ramliy wrote: > > > I stumbled into this problem (works fine in my environment, but fails in > > > /bin/dash) when I first attempted to write test73. > > > > > > At that point the find completion was implemented differently when on > > > windows (using mch_expandpath()) than when on unix (using globpath()) > > > and it still contained the buggy 'recursive = TRUE' stuff, which is now > > > fixed in changeset 7ec9ada2cd81. > > > > > > I could not reproduce the problem that you are reporting with the latest > > > vim (changeset 06a44c4eb3e5 "Prepare for 7.3e release"). > > > > I thought I was using changeset 3607f126a661, but I can't reproduce it > > now. I guess I was using an older version. Sorry for the noise. > > Actually, I am still seeing this. I'll try to dig into why it's still > happening (only in my build environment).
Ok, I finally figured out what the environmental trigger is. The
directory I perform the builds in has a '~' in the name, which triggers
the dive into mch_expand_wildcards. This is happening even though the ~
is in the middle of the path instead of at the beginning. Attached
patch fixes this.
(gdb) bt
#0 mch_expand_wildcards (num_pat=0, pat=0xbffd65fc, num_file=0xbffd677c,
file=0xbffd6778, flags=35) at os_unix.c:5421
#1 0x0811660c in gen_expand_wildcards (num_pat=1, pat=0xbffd65fc,
num_file=0xbffd677c, file=0xbffd6778, flags=35) at misc1.c:9729
#2 0x08116810 in expand_wildcards (num_pat=1, pat=0xbffd65fc,
num_file=0xbffd677c, file=0xbffd6778, flags=35) at misc1.c:8552
#3 0x081169ef in expand_wildcards_eval (pat=0xbffd665c, num_file=0xbffd677c,
file=0xbffd6778, flags=35) at misc1.c:8523
#4 0x080ca9a2 in ExpandFromContext (xp=<value optimized out>,
pat=0x888fe20
"/home/jamessan/src/packages/deb-packages/vim/vim-7.3e.20100809+hg~06a44c4eb3e5/src/vim-nox/testdir/Xfind/**/file*",
num_file=<value optimized out>,
file=0xbffd6778, options=64) at ex_getln.c:4460
#5 0x080ca446 in globpath (path=0x888fe13 "", file=0x888c0f0 "file*",
expand_options=<value optimized out>) at ex_getln.c:5053
#6 0x0811674e in expand_in_path (num_pat=1, pat=0xbffd693c,
num_file=0xbffd6c1c, file=0xbffd6c20, flags=171) at misc1.c:9582
#7 gen_expand_wildcards (num_pat=1, pat=0xbffd693c, num_file=0xbffd6c1c,
file=0xbffd6c20, flags=171) at misc1.c:9751
#8 0x08116810 in expand_wildcards (num_pat=1, pat=0xbffd693c,
num_file=0xbffd6c1c, file=0xbffd6c20, flags=171) at misc1.c:8552
#9 0x081169ef in expand_wildcards_eval (pat=0xbffd699c, num_file=0xbffd6c1c,
file=0xbffd6c20, flags=171) at misc1.c:8523
#10 0x080ca9a2 in ExpandFromContext (xp=<value optimized out>, pat=0x888c0f0
"file*", num_file=<value optimized out>, file=0xbffd6c20, options=218) at
ex_getln.c:4460
#11 0x080cb82b in ExpandOne (xp=0xbffd6c00, str=0x888c0f0 "file*",
orig=0x888c878 "file", options=218, mode=3) at ex_getln.c:3488
#12 0x080cd616 in nextwild (xp=0xbffd6c00, type=3, options=<value optimized
out>) at ex_getln.c:3311
#13 0x080cf65e in getcmdline (firstc=58, count=1, indent=0) at ex_getln.c:803
#14 0x080c13b8 in do_cmdline (cmdline=0x0, getline=0x80d10a0 <getexline>,
cookie=0x0, flags=<value optimized out>) at ex_docmd.c:1018
#15 0x0813268f in nv_colon (cap=0xbffd718c) at normal.c:5319
#16 0x081344fc in normal_cmd (oap=0xbffd7220, toplevel=1) at normal.c:1190
#17 0x080f647b in main_loop (cmdwin=0, noexmode=0) at main.c:1263
#18 0x080f8cb3 in main (argc=7, argv=0xbffd7454) at main.c:968
--
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]>
diff --git a/src/misc1.c b/src/misc1.c
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -9722,7 +9722,7 @@
* variable, use the shell to do that. Discard previously
* found file names and start all over again.
*/
- else if (vim_strpbrk(p, (char_u *)"$~") != NULL)
+ else if (p[0] == '~' || vim_strpbrk(p, (char_u *)"$") != NULL)
{
vim_free(p);
ga_clear_strings(&ga);
signature.asc
Description: Digital signature
