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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user