4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: finddir() uses 'path' by default, where "." means relative to the
12 current file. But it works relative to the current directory.
14 Solution: Add the current buffer name to find_file_in_path_option() for the
16 Files: runtime/doc/eval.txt, src/eval.c
19 *** ../vim-7.0.220/runtime/doc/eval.txt Sun Feb 4 02:59:04 2007
20 --- runtime/doc/eval.txt Mon Mar 26 20:49:06 2007
25 finddir({name}[, {path}[, {count}]]) *finddir()*
26 ! Find directory {name} in {path}. Returns the path of the
27 ! first found match. When the found directory is below the
28 ! current directory a relative path is returned. Otherwise a
29 ! full path is returned.
30 If {path} is omitted or empty then 'path' is used.
31 If the optional {count} is given, find {count}'s occurrence of
32 {name} in {path} instead of the first one.
36 finddir({name}[, {path}[, {count}]]) *finddir()*
37 ! Find directory {name} in {path}. Supports both downwards and
38 ! upwards recursive directory searches. See |file-searching|
39 ! for the syntax of {path}.
40 ! Returns the path of the first found match. When the found
41 ! directory is below the current directory a relative path is
42 ! returned. Otherwise a full path is returned.
43 If {path} is omitted or empty then 'path' is used.
44 If the optional {count} is given, find {count}'s occurrence of
45 {name} in {path} instead of the first one.
46 *** ../vim-7.0.220/src/eval.c Sun Mar 25 17:50:22 2007
47 --- src/eval.c Sun Mar 25 17:43:53 2007
51 fresult = find_file_in_path_option(first ? fname : NULL,
52 first ? (int)STRLEN(fname) : 0,
53 ! 0, first, path, dir, NULL,
54 dir ? (char_u *)"" : curbuf->b_p_sua);
59 fresult = find_file_in_path_option(first ? fname : NULL,
60 first ? (int)STRLEN(fname) : 0,
61 ! 0, first, path, dir, curbuf->b_ffname,
62 dir ? (char_u *)"" : curbuf->b_p_sua);
65 *** ../vim-7.0.220/src/version.c Sun Mar 25 17:50:22 2007
66 --- src/version.c Tue Mar 27 10:16:35 2007
70 { /* Add new patch number below this line */
76 Beer & pretzels can't be served at the same time in any bar or restaurant.
77 [real standing law in North Dakota, United States of America]
79 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
80 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
81 \\\ download, build and distribute -- http://www.A-A-P.org ///
82 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///