From 535c450c72bb643aaff5e024d64980e124d6ddec Mon Sep 17 00:00:00 2001 From: aph Date: Tue, 1 Apr 2014 19:52:48 +0100 Subject: remove DO_AUTOCHDIR --- src/buffer.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 5c77f85506..93f5fce8aa 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -425,7 +425,7 @@ aucmd_abort: return; /* Change directories when the 'acd' option is set. */ - DO_AUTOCHDIR + do_autochdir(); /* * Remove the buffer from the list. @@ -1255,7 +1255,7 @@ void enter_buffer(buf_T *buf) /* Change directories when the 'acd' option is set. */ - DO_AUTOCHDIR + do_autochdir(); if (curbuf->b_kmap_state & KEYMAP_INIT) (void)keymap_init(); @@ -1272,8 +1272,11 @@ void enter_buffer(buf_T *buf) */ void do_autochdir(void) { - if (curbuf->b_ffname != NULL && vim_chdirfile(curbuf->b_ffname) == OK) - shorten_fnames(TRUE); + if (p_acd) { + if (curbuf->b_ffname != NULL && vim_chdirfile(curbuf->b_ffname) == OK) { + shorten_fnames(TRUE); + } + } } /* -- cgit