mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
Merge eb8b72f00c
into 7121983c45
This commit is contained in:
commit
51fd98d680
@ -576,11 +576,12 @@ notfound:
|
|||||||
char **shell_build_argv(const char *cmd, const char *extra_args)
|
char **shell_build_argv(const char *cmd, const char *extra_args)
|
||||||
FUNC_ATTR_NONNULL_RET
|
FUNC_ATTR_NONNULL_RET
|
||||||
{
|
{
|
||||||
size_t argc = tokenize(p_sh, NULL) + (cmd ? tokenize(p_shcf, NULL) : 0);
|
size_t argc = 1 + (cmd ? tokenize(p_shcf, NULL) : 0);
|
||||||
char **rv = xmalloc((argc + 4) * sizeof(*rv));
|
char **rv = xmalloc((argc + 4) * sizeof(*rv));
|
||||||
|
|
||||||
// Split 'shell'
|
size_t i = 0;
|
||||||
size_t i = tokenize(p_sh, rv);
|
rv[i++] = vim_strnsave_unquoted((const char *) p_sh,
|
||||||
|
strlen((const char *) p_sh));
|
||||||
|
|
||||||
if (extra_args) {
|
if (extra_args) {
|
||||||
rv[i++] = xstrdup(extra_args); // Push a copy of `extra_args`
|
rv[i++] = xstrdup(extra_args); // Push a copy of `extra_args`
|
||||||
|
Loading…
Reference in New Issue
Block a user