0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.3232: system() does not work without a second argument

Problem:    system() does not work without a second argument.
Solution:   Do not require a second argument. (Yegappan Lakshmanan,
            closes #8651, closes #8650)
This commit is contained in:
Yegappan Lakshmanan
2021-07-28 11:51:48 +02:00
committed by Bram Moolenaar
parent 9088784972
commit 7e6a2a64f0
5 changed files with 21 additions and 1 deletions

View File

@@ -726,6 +726,17 @@ check_for_string_or_number_or_list_arg(typval_T *args, int idx)
return OK;
}
/*
* Give an error and return FAIL unless "args[idx]" is an optional string
* or number or a list
*/
int
check_for_opt_string_or_number_or_list_arg(typval_T *args, int idx)
{
return (args[idx].v_type == VAR_UNKNOWN
|| check_for_string_or_number_or_list_arg(args, idx) != FAIL);
}
/*
* Give an error and return FAIL unless "args[idx]" is a string or a list
* or a dict.