diff src/window.c @ 20711:d91b8d1e5198 v8.2.0909

patch 8.2.0909: cannot go back to the previous local directory Commit: https://github.com/vim/vim/commit/002bc79991286934a9593b80635c27d4238cdfc4 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jun 5 22:33:42 2020 +0200 patch 8.2.0909: cannot go back to the previous local directory Problem: Cannot go back to the previous local directory. Solution: Add "tcd -" and "lcd -". (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/4362)
author Bram Moolenaar <Bram@vim.org>
date Fri, 05 Jun 2020 22:45:04 +0200
parents 42ab4d40e78f
children 0b4a9642b39c
line wrap: on
line diff
--- a/src/window.c
+++ b/src/window.c
@@ -3809,6 +3809,7 @@ free_tabpage(tabpage_T *tp)
 #endif
 
     vim_free(tp->tp_localdir);
+    vim_free(tp->tp_prevdir);
 
 #ifdef FEAT_PYTHON
     python_tabpage_free(tp);
@@ -4974,6 +4975,7 @@ win_free(
 	vim_free(wp->w_tagstack[i].user_data);
     }
     vim_free(wp->w_localdir);
+    vim_free(wp->w_prevdir);
 
     // Remove the window from the b_wininfo lists, it may happen that the
     // freed memory is re-used for another window.