vim-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
            vim/vim#777, closes vim/vim#803)  Add test_autochdir() to enable 'acd' before
            "starting" is reset.

5c71994f4e
This commit is contained in:
Shougo Matsushita
2016-12-10 18:33:55 +09:00
parent c5f4b92ff9
commit 0c43479979
8 changed files with 36 additions and 3 deletions

View File

@@ -1330,7 +1330,7 @@ void enter_buffer(buf_T *buf)
void do_autochdir(void)
{
if (p_acd) {
if (starting == 0
if ((starting == 0 || test_autochdir)
&& curbuf->b_ffname != NULL
&& vim_chdirfile(curbuf->b_ffname) == OK) {
shorten_fnames(true);