From: Bram Moolenaar Date: Tue, 23 Feb 2016 15:19:07 +0000 (+0100) Subject: patch 7.4.1401 X-Git-Tag: v7.4.1401 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=6bd364e08461159ad3c153ffba4def5b896486a1;p=thirdparty%2Fvim.git patch 7.4.1401 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) --- diff --git a/src/buffer.c b/src/buffer.c index 89dedc58f9..26d77236f7 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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 diff --git a/src/version.c b/src/version.c index 3bcbd8d0dc..f3fc7c9427 100644 --- a/src/version.c +++ b/src/version.c @@ -748,6 +748,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1401, /**/ 1400, /**/