comparison src/ex_docmd.c @ 20645:b60bb094af52 v8.2.0876

patch 8.2.0876: :pwd does not give a hint about the scope of the directory Commit: https://github.com/vim/vim/commit/950587242cad52d067a15f0f0c83528a28f75731 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 1 16:26:19 2020 +0200 patch 8.2.0876: :pwd does not give a hint about the scope of the directory Problem: :pwd does not give a hint about the scope of the directory Solution: Make ":verbose pwd" show the scope. (Takuya Fujiwara, closes https://github.com/vim/vim/issues/5469)
author Bram Moolenaar <Bram@vim.org>
date Mon, 01 Jun 2020 16:30:03 +0200
parents d571231175b4
children 3437bf2ce2d4
comparison
equal deleted inserted replaced
20644:ca42fc075a80 20645:b60bb094af52
6617 shorten_fnames(TRUE); 6617 shorten_fnames(TRUE);
6618 } 6618 }
6619 6619
6620 /* 6620 /*
6621 * Change directory function used by :cd/:tcd/:lcd Ex commands and the 6621 * Change directory function used by :cd/:tcd/:lcd Ex commands and the
6622 * chdir() function. If 'winlocaldir' is TRUE, then changes the window-local 6622 * chdir() function.
6623 * directory. If 'tablocaldir' is TRUE, then changes the tab-local directory. 6623 * scope == CDSCOPE_WINDOW: changes the window-local directory
6624 * Otherwise changes the global directory. 6624 * scope == CDSCOPE_TABPAGE: changes the tab-local directory
6625 * Otherwise: changes the global directory
6625 * Returns TRUE if the directory is successfully changed. 6626 * Returns TRUE if the directory is successfully changed.
6626 */ 6627 */
6627 int 6628 int
6628 changedir_func( 6629 changedir_func(
6629 char_u *new_dir, 6630 char_u *new_dir,
6749 if (mch_dirname(NameBuff, MAXPATHL) == OK) 6750 if (mch_dirname(NameBuff, MAXPATHL) == OK)
6750 { 6751 {
6751 #ifdef BACKSLASH_IN_FILENAME 6752 #ifdef BACKSLASH_IN_FILENAME
6752 slash_adjust(NameBuff); 6753 slash_adjust(NameBuff);
6753 #endif 6754 #endif
6754 msg((char *)NameBuff); 6755 if (p_verbose > 0)
6756 {
6757 char *context = "global";
6758
6759 if (curwin->w_localdir != NULL)
6760 context = "window";
6761 else if (curtab->tp_localdir != NULL)
6762 context = "tabpage";
6763 smsg("[%s] %s", context, (char *)NameBuff);
6764 }
6765 else
6766 msg((char *)NameBuff);
6755 } 6767 }
6756 else 6768 else
6757 emsg(_("E187: Unknown")); 6769 emsg(_("E187: Unknown"));
6758 } 6770 }
6759 6771