diff options
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c index 89dedc58f..26d77236f 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 |