updated for version 7.4.642
Problem: When using "gf" escaped spaces are not handled.
Solution: Recognize escaped spaces.
diff --git a/src/misc2.c b/src/misc2.c
index d421a00..8f19578 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -5474,6 +5474,7 @@
*
* options:
* FNAME_MESS give error message when not found
+ * FNAME_UNESC unescape backslashes.
*
* Uses NameBuff[]!
*
@@ -5491,7 +5492,8 @@
}
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 @@
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] == '.'