]> granicus.if.org Git - vim/commitdiff
patch 8.0.1461: missing another file in patch v8.0.1461
authorBram Moolenaar <Bram@vim.org>
Sat, 3 Feb 2018 17:33:17 +0000 (18:33 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 3 Feb 2018 17:33:17 +0000 (18:33 +0100)
Problem:    Missing another file in patch.
Solution:   Add changes to missing file.

src/ex_cmds.c
src/version.c

index 91f5124de907e1c5d2669ebb2822fbd7d08d7cfa..f4129019ab2d32c673bb20f999215db27d7e280e 100644 (file)
@@ -4368,8 +4368,22 @@ do_ecmd(
     if (p_im)
        need_start_insertmode = TRUE;
 
-    /* Change directories when the 'acd' option is set. */
-    DO_AUTOCHDIR
+#ifdef FEAT_AUTOCHDIR
+    /* Change directories when the 'acd' option is set and we aren't already in
+     * that directory (should already be done above). Expect getcwd() to be
+     * faster than calling shorten_fnames() unnecessarily. */
+    if (p_acd && curbuf->b_ffname != NULL)
+    {
+       char_u  curdir[MAXPATHL];
+       char_u  filedir[MAXPATHL];
+
+       vim_strncpy(filedir, curbuf->b_ffname, MAXPATHL - 1);
+       *gettail_sep(filedir) = NUL;
+       if (mch_dirname(curdir, MAXPATHL) != FAIL
+               && vim_fnamecmp(curdir, filedir) != 0)
+           do_autochdir();
+    }
+#endif
 
 #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG)
     if (curbuf->b_ffname != NULL)
index d3670bcdaa0bb6364beb4adb66dcb3863f9f3cfb..c24843ffa547b14d7683829888e93ffdbe563d78 100644 (file)
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1461,
 /**/
     1460,
 /**/