vim-patch:8.1.1869: code for the argument list is spread out (#19791)

Problem:    Code for the argument list is spread out.
Solution:   Put argument list code in arglist.c. (Yegappan Lakshmanan,
            closes vim/vim#4819)
4ad62155a1
This commit is contained in:
zeertzjq
2022-08-16 14:16:03 +08:00
committed by GitHub
parent d5d6ed311b
commit 5e98a41872
16 changed files with 1159 additions and 1099 deletions

View File

@@ -4853,18 +4853,6 @@ static int get_env_tv(char **arg, typval_T *rettv, int evaluate)
return OK;
}
/// Get the argument list for a given window
void get_arglist_as_rettv(aentry_T *arglist, int argcount, typval_T *rettv)
{
tv_list_alloc_ret(rettv, argcount);
if (arglist != NULL) {
for (int idx = 0; idx < argcount; idx++) {
tv_list_append_string(rettv->vval.v_list,
(const char *)alist_name(&arglist[idx]), -1);
}
}
}
/// Add an assert error to v:errors.
void assert_error(garray_T *gap)
{