diff src/misc2.c @ 794:f19994020dad

updated for version 7.0231
author vimboss
date Tue, 21 Mar 2006 21:29:36 +0000
parents b29b006d52d2
children 8bebcabccc2c
line wrap: on
line diff
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -5152,7 +5152,7 @@ find_file_in_path(ptr, len, options, fir
 {
     return find_file_in_path_option(ptr, len, options, first,
 	    *curbuf->b_p_path == NUL ? p_path : curbuf->b_p_path,
-	    FALSE, rel_fname);
+	    FALSE, rel_fname, curbuf->b_p_sua);
 }
 
 static char_u	*ff_file_to_find = NULL;
@@ -5185,11 +5185,11 @@ find_directory_in_path(ptr, len, options
     char_u	*rel_fname;	/* file name searching relative to */
 {
     return find_file_in_path_option(ptr, len, options, TRUE, p_cdpath,
-							     TRUE, rel_fname);
+					       TRUE, rel_fname, (char_u *)"");
 }
 
     char_u *
-find_file_in_path_option(ptr, len, options, first, path_option, need_dir, rel_fname)
+find_file_in_path_option(ptr, len, options, first, path_option, need_dir, rel_fname, suffixes)
     char_u	*ptr;		/* file name */
     int		len;		/* length of file name */
     int		options;
@@ -5197,6 +5197,7 @@ find_file_in_path_option(ptr, len, optio
     char_u	*path_option;	/* p_path or p_cdpath */
     int		need_dir;	/* looking for directory name */
     char_u	*rel_fname;	/* file name we are looking relative to. */
+    char_u	*suffixes;	/* list of suffixes, 'suffixesadd' option */
 {
     static char_u	*dir;
     static int		did_findfile_init = FALSE;
@@ -5289,7 +5290,7 @@ find_file_in_path_option(ptr, len, optio
 
 		/* When the file doesn't exist, try adding parts of
 		 * 'suffixesadd'. */
-		buf = curbuf->b_p_sua;
+		buf = suffixes;
 		for (;;)
 		{
 		    if (