On Tue, Apr 16, 2013 at 4:31 PM, Nazri Ramliy <ayieh...@gmail.com> wrote:
> I can reproduce this with my gvim 7.3.46 (on linux vim 7.3.892 there's> no 
> problem). I'll investigate and hopefully post a fix soon.

I found the problem and the solution.

Problem summary:

expand_path_option() leaves trailing path separators after expanding the
path option. These expanded paths are passed to globpath(), which then
fed them to copy_option_part() as a comma-separated list of paths. On
windows the presence of the trailing path separator before the comma
causes copy_option_part() to not work as intended as it treats the
backslash as escaping the commas.

Solution:

Fix expand_path_option to not leave a trailing path separators when
expanding the 'path' option.

Example problem:

With 'path' set to ".,,", and editing the file c:\foo\bar.txt, from the
directory c:\, and doing :find quu<tab>, expand_path_option() expands
the ".,," to:

  c:\foo\,c:\

Which is wrongly treated as a single option value by copy_option_part()

Compare the same behavior on unix:

when editing /foo/bar.txt and the current directory is /,
expand_path_option() expands the ".,," to:

  /foo/,/

This is seen as two option values by copy_option_part()

Attached patch fixes this problem. It adds a test case that shows the
problem - note that the problem only happen on windows, so the test
fails on windows but ran successfully on unix.

Nazri.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Attachment: findfix.patch
Description: Binary data

Raspunde prin e-mail lui