0
0
mirror of https://github.com/vim/vim.git synced 2025-11-13 22:54:27 -05:00

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)
This commit is contained in:
Bram Moolenaar
2021-12-04 22:03:34 +00:00
parent 23bdef2571
commit dea4a61637
3 changed files with 36 additions and 0 deletions

View File

@@ -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;