Mercurial > vim
changeset 8216:03af9acbefb0 v7.4.1401
commit https://github.com/vim/vim/commit/6bd364e08461159ad3c153ffba4def5b896486a1
Author: Bram Moolenaar <Bram@vim.org>
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 23 Feb 2016 16:30:05 +0100 |
parents | 3df75966ef43 |
children | c52abf35df88 |
files | src/buffer.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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