0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 7.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.
This commit is contained in:
Bram Moolenaar
2016-07-09 23:40:45 +02:00
parent 32b808a4bd
commit 5c71994f4e
8 changed files with 48 additions and 3 deletions

View File

@@ -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);