From 566f8f80d6cb7ef2df8366e5f092b0841ee757ce Mon Sep 17 00:00:00 2001 From: Famiu Haque Date: Thu, 12 May 2022 10:57:43 +0200 Subject: refactor(api/nvim_cmd): use `kvec_t` for constructing cmdline string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Björn Linse --- src/nvim/api/vimscript.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nvim/api/vimscript.c') diff --git a/src/nvim/api/vimscript.c b/src/nvim/api/vimscript.c index 02f406d686..506b3e7f10 100644 --- a/src/nvim/api/vimscript.c +++ b/src/nvim/api/vimscript.c @@ -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; -- cgit