patch 8.2.3739: in wrong directory when using win_execute() with 'acd' set
Problem: In wrong directory when using win_execute() with 'acd' set.
Solution: Restore the directory when returning to the window. (closes #9276)
diff --git a/src/window.c b/src/window.c
index c14abe4..4050ed0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4858,6 +4858,11 @@
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;