aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-10-17 10:26:11 -0400
committerGitHub <noreply@github.com>2021-10-17 10:26:11 -0400
commita1e8199fff098e158e22e25abc20c512575c1c53 (patch)
tree360b7b51a293eb4aafa8be7b7bcdd726bf34854b /src/nvim/buffer.c
parent77e6ecf85aa756ebca4548e4cfbc906bf8fff568 (diff)
parent38821cc50e7d353b7e8a372da8413e550595b734 (diff)
downloadrneovim-a1e8199fff098e158e22e25abc20c512575c1c53.tar.gz
rneovim-a1e8199fff098e158e22e25abc20c512575c1c53.tar.bz2
rneovim-a1e8199fff098e158e22e25abc20c512575c1c53.zip
Merge pull request #15952 from zeertzjq/vim-8.1.1291
vim-patch:8.0.{1459,1460,1461,1463},8.1.{0602,0604,1291},8.2.{0189,0876,0909,1411}: chdir and DirChanged related patches
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 1de54e0736..826a197454 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -593,9 +593,6 @@ bool close_buffer(win_T *win, buf_T *buf, int action, bool abort_if_last)
buf->b_nwindows--;
}
- // Change directories when the 'acd' option is set.
- do_autochdir();
-
// Disable buffer-updates for the current buffer.
// No need to check `unload_buf`: in that case the function returned above.
buf_updates_unload(buf, false);
@@ -1628,7 +1625,7 @@ void do_autochdir(void)
if (p_acd) {
if (starting == 0
&& curbuf->b_ffname != NULL
- && vim_chdirfile(curbuf->b_ffname) == OK) {
+ && vim_chdirfile(curbuf->b_ffname, kCdCauseAuto) == OK) {
post_chdir(kCdScopeGlobal, false);
shorten_fnames(true);
}