]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1401 v7.4.1401
authorBram Moolenaar <Bram@vim.org>
Tue, 23 Feb 2016 15:19:07 +0000 (16:19 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 23 Feb 2016 15:19:07 +0000 (16:19 +0100)
Problem:    Having 'autochdir' set during startup and using diff mode doesn't
            work. (Axel Bender)
Solution:   Don't use 'autochdir' while still starting up. (Christian
            Brabandt)

src/buffer.c
src/version.c

index 89dedc58f92b9207abd4983bf53ece331ac6f0d2..26d77236f7c7331ccfcee06dea2add9330f5ea69 100644 (file)
@@ -1615,11 +1615,14 @@ enter_buffer(buf_T *buf)
 #if defined(FEAT_AUTOCHDIR) || defined(PROTO)
 /*
  * Change to the directory of the current buffer.
+ * Don't do this while still starting up.
  */
     void
 do_autochdir(void)
 {
-    if (curbuf->b_ffname != NULL && vim_chdirfile(curbuf->b_ffname) == OK)
+    if (starting == 0
+           && curbuf->b_ffname != NULL
+           && vim_chdirfile(curbuf->b_ffname) == OK)
        shorten_fnames(TRUE);
 }
 #endif
index 3bcbd8d0dc90a5b5e6baeba5054ee2266971f1b9..f3fc7c9427dd527c13d569304f8e77ed36bb1bc8 100644 (file)
@@ -748,6 +748,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1401,
 /**/
     1400,
 /**/