Dominique Pelle wrote:
> Using Vim-7.3f (2559:84ba6293f9d7) on Linux, I see 2 bugs with
> the ":find" command.
>
> Bug #1:
>
> I can reproduce the following error with Valgrind:
>
> ==13725== Source and destination overlap in strcat(0x469774c, 0x4697756)
> ==13725== at 0x4025E30: strcat (mc_replace_strmem.c:176)
> ==13725== by 0x810BA06: uniquefy_paths (misc1.c:9558)
> ==13725== by 0x810C14D: gen_expand_wildcards (misc1.c:9842)
> ==13725== by 0x810A9AF: expand_wildcards (misc1.c:8593)
> ==13725== by 0x810A95E: expand_wildcards_eval (misc1.c:8564)
> ==13725== by 0x80B6214: ExpandFromContext (ex_getln.c:4468)
> ==13725== by 0x80B4C5E: ExpandOne (ex_getln.c:3496)
> ==13725== by 0x80B4843: nextwild (ex_getln.c:3319)
> ==13725== by 0x80B0BBA: getcmdline (ex_getln.c:803)
> ==13725== by 0x80B2CF6: getexline (ex_getln.c:2126)
> ==13725== by 0x809D9F3: do_cmdline (ex_docmd.c:1018)
> ==13725== by 0x8121DFF: nv_colon (normal.c:5319)
> ==13725== by 0x811BEC3: normal_cmd (normal.c:1190)
> ==13725== by 0x80DF966: main_loop (main.c:1260)
> ==13725== by 0x80DF3A9: main (main.c:965)
>
> Steps to reproduce:
>
> $ mkdir /tmp/foo
> $ touch /tmp/foo/xxxxxx
>
> $ valgrind 2> /tmp/vg.log vim -u NONE -N -c ':cd /tmp/foo' \
> -c ':call feedkeys(":find /tmp/foo/\<C-D>")'
>
> And observe error in /tmp/vg.log.
>
> Attached patch fixes this bug.
Thanks. The strcat should actually work, unless it's implemented in a
weird way.
> Bug #2:
>
> Using the same file /tmp/foo/xxxxxx as above, file completion does
> not work if I do:
>
> :cd /tmp
> :find /tmp/fo<C-D> " does not work, no completion.
>
> For file completion to work in the current directory, I have to use:
>
> :cd /tmp
> :find ./fo<C-D> " this works.
>
> I have not fixed this second bug yet. I assume that's not the expected
> behavior, is it?
It works OK for me. What is your 'path' set to? It should be the
default, and it works for me with the default.
When I complete ":find /tmp/fo" it shortens to ":find foo/". A bit
strange, but it's correct.
--
hundred-and-one symptoms of being an internet addict:
61. Your best friends know your e-mail address, but neither your phone number
nor the address where you live.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php