diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-11-18 18:53:45 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-11-18 18:53:45 +0000 |
commit | 0526815c15170a5926e1008600ec29d42d8b64c2 (patch) | |
tree | cb743f2c7be21b9cbf5f711144018539f6e313ee /src/ex_docmd.c | |
parent | 3cad47038547e694cfa26ba39c399f610d2054bd (diff) |
patch 8.2.3617: ":verbose pwd" does not mention 'autochdir' was appliedv8.2.3617
Problem: ":verbose pwd" does not mention 'autochdir' was applied.
Solution: Remember the last chdir was done by 'autochdir'. (issue #9142)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 052f230dd4..aae34f90c4 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -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"; |