mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.3618: getcwd() is unclear about how 'autochdir' is used
Problem: getcwd() is unclear about how 'autochdir' is used. Solution: Update the help for getcwd(). Without any arguments always return the actual current directory. (closes #9142)
This commit is contained in:
@@ -1102,13 +1102,15 @@ f_getcwd(typval_T *argvars, typval_T *rettv)
|
||||
else
|
||||
wp = find_tabwin(&argvars[0], &argvars[1], &tp);
|
||||
|
||||
if (wp != NULL && wp->w_localdir != NULL)
|
||||
if (wp != NULL && wp->w_localdir != NULL
|
||||
&& argvars[0].v_type != VAR_UNKNOWN)
|
||||
rettv->vval.v_string = vim_strsave(wp->w_localdir);
|
||||
else if (tp != NULL && tp->tp_localdir != NULL)
|
||||
else if (tp != NULL && tp->tp_localdir != NULL
|
||||
&& argvars[0].v_type != VAR_UNKNOWN)
|
||||
rettv->vval.v_string = vim_strsave(tp->tp_localdir);
|
||||
else if (wp != NULL || tp != NULL || global)
|
||||
{
|
||||
if (globaldir != NULL)
|
||||
if (globaldir != NULL && argvars[0].v_type != VAR_UNKNOWN)
|
||||
rettv->vval.v_string = vim_strsave(globaldir);
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user