From 4455fc3f05ccee06d416d269d3a83a423b0b15b8 Mon Sep 17 00:00:00 2001 From: Michael Reed Date: Sun, 19 Jul 2015 06:14:26 -0400 Subject: Remove ':Print' command #3049 There's no way this isn't some long-running joke: "Just as ':print'. Was apparently added to Vi for people that keep the shift key pressed too long..." Note: A user command can overrule this command. Regarding ':X': the command has been removed for a while, but the documentation must have been missed, so remove it here. Reviewed-by: Justin M. Keyes Helped-by: @jusga --- src/nvim/ex_cmds.lua | 6 ------ src/nvim/ex_docmd.c | 5 ++--- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index 41c596c5a8..5221554306 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -3164,12 +3164,6 @@ return { addr_type=ADDR_LINES, func='ex_previous', }, - { - command='Print', - flags=bit.bor(RANGE, WHOLEFOLD, COUNT, EXFLAGS, TRLBAR, CMDWIN), - addr_type=ADDR_LINES, - func='ex_print', - }, { command='~', enum='CMD_tilde', diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index fc7e2c9b44..c66447d611 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -2401,9 +2401,8 @@ static char_u *find_command(exarg_T *eap, int *full) break; } - /* Look for a user defined command as a last resort. Let ":Print" be - * overruled by a user defined command. */ - if ((eap->cmdidx == CMD_SIZE || eap->cmdidx == CMD_Print) + // Look for a user defined command as a last resort. + if ((eap->cmdidx == CMD_SIZE) && *eap->cmd >= 'A' && *eap->cmd <= 'Z') { /* User defined commands may contain digits. */ while (ASCII_ISALNUM(*p)) -- cgit