updated for version 7.1-126
diff --git a/src/fileio.c b/src/fileio.c
index 84416df..39b4226 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -114,7 +114,7 @@
{
int bw_fd; /* file descriptor */
char_u *bw_buf; /* buffer with data to be written */
- int bw_len; /* lenght of data */
+ int bw_len; /* length of data */
#ifdef HAS_BW_FLAGS
int bw_flags; /* FIO_ flags */
#endif
@@ -5556,6 +5556,27 @@
/*
* Try to find a shortname by comparing the fullname with the current
* directory.
+ * Returns "full_path" or pointer into "full_path" if shortened.
+ */
+ char_u *
+shorten_fname1(full_path)
+ char_u *full_path;
+{
+ char_u dirname[MAXPATHL];
+ char_u *p = full_path;
+
+ if (mch_dirname(dirname, MAXPATHL) == OK)
+ {
+ p = shorten_fname(full_path, dirname);
+ if (p == NULL || *p == NUL)
+ p = full_path;
+ }
+ return p;
+}
+
+/*
+ * Try to find a shortname by comparing the fullname with the current
+ * directory.
* Returns NULL if not shorter name possible, pointer into "full_path"
* otherwise.
*/