mirror of
https://github.com/neovim/neovim.git
synced 2025-10-14 13:56:05 +00:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user