Unreserve :X #10807

closes #10806
This commit is contained in:
Julian Berman
2019-08-18 19:28:13 +02:00
committed by Justin M. Keyes
parent ce9367c254
commit 2963533fe1
2 changed files with 1 additions and 3 deletions

View File

@@ -5266,8 +5266,7 @@ static void ex_command(exarg_T *eap)
} else if (!ASCII_ISUPPER(*name)) { } else if (!ASCII_ISUPPER(*name)) {
EMSG(_("E183: User defined commands must start with an uppercase letter")); EMSG(_("E183: User defined commands must start with an uppercase letter"));
return; return;
} else if ((name_len == 1 && *name == 'X') } else if (name_len <= 4 && STRNCMP(name, "Next", name_len) == 0) {
|| (name_len <= 4 && STRNCMP(name, "Next", name_len) == 0)) {
EMSG(_("E841: Reserved name, cannot be used for user defined command")); EMSG(_("E841: Reserved name, cannot be used for user defined command"));
return; return;
} else { } else {

View File

@@ -201,7 +201,6 @@ func Test_CmdErrors()
call assert_fails('com! docmd :', 'E183:') call assert_fails('com! docmd :', 'E183:')
call assert_fails('com! \<Tab> :', 'E182:') call assert_fails('com! \<Tab> :', 'E182:')
call assert_fails('com! _ :', 'E182:') call assert_fails('com! _ :', 'E182:')
call assert_fails('com! X :', 'E841:')
call assert_fails('com! - DoCmd :', 'E175:') call assert_fails('com! - DoCmd :', 'E175:')
call assert_fails('com! -xxx DoCmd :', 'E181:') call assert_fails('com! -xxx DoCmd :', 'E181:')
call assert_fails('com! -addr DoCmd :', 'E179:') call assert_fails('com! -addr DoCmd :', 'E179:')