0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.4.642

Problem:    When using "gf" escaped spaces are not handled.
Solution:   Recognize escaped spaces.
This commit is contained in:
Bram Moolenaar
2015-02-27 17:19:10 +01:00
parent dfd7691bb8
commit d45c07ac74
4 changed files with 24 additions and 6 deletions

View File

@@ -5474,6 +5474,7 @@ free_findfile()
*
* options:
* FNAME_MESS give error message when not found
* FNAME_UNESC unescape backslashes.
*
* Uses NameBuff[]!
*
@@ -5491,7 +5492,8 @@ find_directory_in_path(ptr, len, options, rel_fname)
}
char_u *
find_file_in_path_option(ptr, len, options, first, path_option, find_what, rel_fname, suffixes)
find_file_in_path_option(ptr, len, options, first, path_option,
find_what, rel_fname, suffixes)
char_u *ptr; /* file name */
int len; /* length of file name */
int options;
@@ -5530,6 +5532,13 @@ find_file_in_path_option(ptr, len, options, first, path_option, find_what, rel_f
file_name = NULL;
goto theend;
}
if (options & FNAME_UNESC)
{
/* Change all "\ " to " ". */
for (ptr = ff_file_to_find; *ptr != NUL; ++ptr)
if (ptr[0] == '\\' && ptr[1] == ' ')
mch_memmove(ptr, ptr + 1, STRLEN(ptr));
}
}
rel_to_curdir = (ff_file_to_find[0] == '.'