diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-12-20 07:48:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-20 07:48:52 +0800 |
commit | b3c9563e6b7f217e4cc6c0e426af867d42b683cc (patch) | |
tree | fb612132b6d4f257d4ada5abe5c2db331c38b6e4 /src/nvim/usercmd.c | |
parent | 23d8f5b870ab2a12882ba20e32d24b31c137f6a9 (diff) | |
parent | ff62d761938e72129f6ba7ed2c2d56455444ebe7 (diff) | |
download | rneovim-b3c9563e6b7f217e4cc6c0e426af867d42b683cc.tar.gz rneovim-b3c9563e6b7f217e4cc6c0e426af867d42b683cc.tar.bz2 rneovim-b3c9563e6b7f217e4cc6c0e426af867d42b683cc.zip |
Merge pull request #21477 from zeertzjq/vim-9.0.1078
vim-patch:9.0.{1078,1079}
Diffstat (limited to 'src/nvim/usercmd.c')
-rw-r--r-- | src/nvim/usercmd.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/usercmd.c b/src/nvim/usercmd.c index ca5307fe24..bc47b1b807 100644 --- a/src/nvim/usercmd.c +++ b/src/nvim/usercmd.c @@ -943,7 +943,7 @@ void ex_command(exarg_T *eap) end = skiptowhite(p); if (uc_scan_attr(p, (size_t)(end - p), &argt, &def, &flags, &compl, (char_u **)&compl_arg, &addr_type_arg) == FAIL) { - return; + goto theend; } p = skipwhite(end); } @@ -953,7 +953,7 @@ void ex_command(exarg_T *eap) end = uc_validate_name(name); if (!end) { emsg(_("E182: Invalid command name")); - return; + goto theend; } name_len = (size_t)(end - name); @@ -971,7 +971,12 @@ void ex_command(exarg_T *eap) } else { uc_add_command(name, name_len, p, argt, def, flags, compl, compl_arg, LUA_NOREF, LUA_NOREF, addr_type_arg, LUA_NOREF, eap->forceit); + + return; // success } + +theend: + xfree(compl_arg); } /// ":comclear" |