diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-08-09 08:28:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-09 08:28:36 -0400 |
commit | 9ef7003c38c3be31e47732256fd591b5884613d1 (patch) | |
tree | 77b1224ff6ed6066b3b867085e694071dc4e0b03 /src/nvim/ex_docmd.c | |
parent | 68f61b167e71ca8dd42157b10b3096571c06f39d (diff) | |
parent | 292148b08b56476af0dc688e8a82df7d8e33f699 (diff) | |
download | rneovim-9ef7003c38c3be31e47732256fd591b5884613d1.tar.gz rneovim-9ef7003c38c3be31e47732256fd591b5884613d1.tar.bz2 rneovim-9ef7003c38c3be31e47732256fd591b5884613d1.zip |
Merge pull request #15312 from janlazo/vim-8.2.2639
vim-patch:8.1.{1818},8.2.{1464,2639,2814,2947,2976,2986,3114,3141,3160,3198}
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index d10ecf5c7f..3afcd9ec5a 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -5514,6 +5514,9 @@ invalid_count: return OK; } +static char e_complete_used_without_nargs[] = N_( + "E1208: -complete used without -nargs"); + /* * ":command ..." */ @@ -5565,10 +5568,10 @@ static void ex_command(exarg_T *eap) uc_list(name, end - name); } else if (!ASCII_ISUPPER(*name)) { EMSG(_("E183: User defined commands must start with an uppercase letter")); - return; } else if (name_len <= 4 && STRNCMP(name, "Next", name_len) == 0) { EMSG(_("E841: Reserved name, cannot be used for user defined command")); - return; + } else if (compl > 0 && (argt & EX_EXTRA) == 0) { + EMSG(_(e_complete_used_without_nargs)); } else { uc_add_command(name, end - name, p, argt, def, flags, compl, compl_arg, addr_type_arg, eap->forceit); |