summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-04 22:03:34 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-04 22:03:34 +0000
commitdea4a616376c6500894c16e26057ce16d7ef9f0e (patch)
tree49e9b87316316013e5bbd1ff396729d2b614c265 /src/window.c
parent23bdef2571b589414cd9744059abd507b043996b (diff)
downloadvim-git-dea4a616376c6500894c16e26057ce16d7ef9f0e.tar.gz
patch 8.2.3739: in wrong directory when using win_execute() with 'acd' setv8.2.3739
Problem: In wrong directory when using win_execute() with 'acd' set. Solution: Restore the directory when returning to the window. (closes #9276)
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c
index c14abe489..4050ed04d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4858,6 +4858,11 @@ win_enter_ext(win_T *wp, int flags)
void
fix_current_dir(void)
{
+#ifdef FEAT_AUTOCHDIR
+ if (p_acd)
+ do_autochdir();
+ else
+#endif
if (curwin->w_localdir != NULL || curtab->tp_localdir != NULL)
{
char_u *dirname;