# HG changeset patch # User Christian Brabandt # Date 1456241405 -3600 # Node ID 03af9acbefb00aa160270466ede8227e8ce67c8b # Parent 3df75966ef43bc9a1d859d03b5e987b4c301a595 commit https://github.com/vim/vim/commit/6bd364e08461159ad3c153ffba4def5b896486a1 Author: Bram Moolenaar Date: Tue Feb 23 16:19:07 2016 +0100 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 --- 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 --- a/src/version.c +++ b/src/version.c @@ -749,6 +749,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1401, +/**/ 1400, /**/ 1399,