patch 8.2.3593: directory is wrong after executing "lcd" with win_execute()
Problem: Directory is wrong after executing "lcd" with win_execute().
Solution: Correct the directory when going back to the original window.
(closes #9132)
diff --git a/src/evalwindow.c b/src/evalwindow.c
index f043c6f..c905715 100644
--- a/src/evalwindow.c
+++ b/src/evalwindow.c
@@ -1311,5 +1311,9 @@
// to the first valid window.
win_goto(firstwin);
# endif
+
+ // If called by win_execute() and executing the command changed the
+ // directory, it now has to be restored.
+ fix_current_dir();
}
#endif