0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.2.3617: ":verbose pwd" does not mention 'autochdir' was applied

Problem:    ":verbose pwd" does not mention 'autochdir' was applied.
Solution:   Remember the last chdir was done by 'autochdir'.  (issue #9142)
This commit is contained in:
Bram Moolenaar
2021-11-18 18:53:45 +00:00
parent 3cad470385
commit 0526815c15
9 changed files with 51 additions and 4 deletions

View File

@@ -7390,6 +7390,7 @@ changedir_func(
if (dir_differs)
{
last_chdir_reason = NULL;
if (scope == CDSCOPE_WINDOW)
acmd_fname = (char_u *)"window";
else if (scope == CDSCOPE_TABPAGE)
@@ -7453,7 +7454,9 @@ ex_pwd(exarg_T *eap UNUSED)
{
char *context = "global";
if (curwin->w_localdir != NULL)
if (last_chdir_reason != NULL)
context = last_chdir_reason;
else if (curwin->w_localdir != NULL)
context = "window";
else if (curtab->tp_localdir != NULL)
context = "tabpage";