Nazri Ramliy wrote: > >> This is a regression introduced by my own patch previously > >> (7ce8b24450dc: Improvements for > >> ":find" completion. (Nazri Ramliy)). > >> > >> Attached patch fixes the regression and add tests to test73 to catch the > >> bug. > >> > >> The test runs fine on unix, but fails on msvc vim. I'll investigate > >> it later. Sorry I'm in a bit of a hurry > >> I'll look into cleaning up the patch and making the test successfull > >> on msvc vim soon. > > > > Thanks. > > > > I noticed a few memory leaks and fixed them. > > > > I changed the STRNCMP() to fnamencmp(). That might fix the problem on > > MS-Windows. > > > > I moved a few C99 style declarations to start of code block. > > Thanks the fixes. Sorry, the patch was made in a hurry. > > > > > That's an awful lot of problems... I'll spend some more time on this > > tomorrow. > > I've spent some time looking over the changes and made a few more fixes. > > Instead of one big patch I'm attaching 7 small patches with the hope > that they are easier for you to review. These are on top of the latest > changeset at the moment (20e83abf88b1). > > 0001: Make test73 pass on msvc-vim > > 0002: Call uniquefy_paths only when there are candidates. > > 0003: I noticed that the "is_in_curdir" check only works correctly for > file, not directory. The must be some condition that will fail > the find completion due to this but I can't think of any at the > moment. > > 0004: Delete an "#if defined(MSWIN) || defined(MSDOS)" conditional. > I think it is not really needed there because "cutoff" points to a > filename produced by globpath and the directory separators should > have already been normalized to the platform's path separator. > > 0005: Add a failing test to test73 to show a peculiar behavior of > shorten_fname() on windows when used for the shortening the > filename. This test runs fine on unix, but fails on msvc-vim. > > 0006: Work around shorten_fname()'s behavior on windows. With this > change test73 runs successfully. > > 0007: Remove irrelevant comment.
I have now taken another look at the code. I have done a few cleanups. I found one bug: when 'path' has an item "./subdir" it was not used relative to the current buffer. Please check that I didn't break anything. -- Over the years, I've developed my sense of deja vu so acutely that now I can remember things that *have* happened before ... /// 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
