refactor(api/nvim_cmd): use kvec_t for constructing cmdline string

Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
This commit is contained in:
Famiu Haque
2022-05-12 10:57:43 +02:00
parent 8fba428bc6
commit 566f8f80d6
5 changed files with 111 additions and 109 deletions

View File

@@ -1290,9 +1290,7 @@ String nvim_cmd(uint64_t channel_id, Dict(cmd) *cmd, Dict(cmd_opts) *opts, Error
// Finally, build the command line string that will be stored inside ea.cmdlinep.
// This also sets the values of ea.cmd, ea.arg, ea.args and ea.arglens.
if (build_cmdline_str(&cmdline, &ea, &cmdinfo, args, argc) == FAIL) {
goto end;
}
build_cmdline_str(&cmdline, &ea, &cmdinfo, args, argc);
ea.cmdlinep = &cmdline;
garray_T capture_local;