summaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-07-09 23:40:45 +0200
committerBram Moolenaar <Bram@vim.org>2016-07-09 23:40:45 +0200
commit5c71994f4ee5f87d4cce990dbc9684c70b1e108b (patch)
tree54d709f577451315f508421842acd40c5d8776f1 /src/buffer.c
parent32b808a4bdf35b0dea63c735702a591e5869fecd (diff)
patch 7.4.2015v7.4.2015
Problem: When a file gets a name when writing it 'acd' is not effective. (Dan Church) Solution: Invoke DO_AUTOCHDIR after writing the file. (Allen Haim, closes #777, closes #803) Add test_autochdir() to enable 'acd' before "starting" is reset.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 7c69b8e9d7..b434d58e90 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1635,7 +1635,7 @@ enter_buffer(buf_T *buf)
void
do_autochdir(void)
{
- if (starting == 0
+ if ((starting == 0 || test_autochdir)
&& curbuf->b_ffname != NULL
&& vim_chdirfile(curbuf->b_ffname) == OK)
shorten_fnames(TRUE);