aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-12-26 09:27:29 -0500
committerJustin M. Keyes <justinkz@gmail.com>2014-12-27 16:28:02 -0500
commitbb574e22028b448f25e7e2b5c1df6f45b32c3f79 (patch)
tree720b3af8c5cb288315e1e1183f4ece5025227cfb /src/nvim/ex_docmd.c
parent68637debf6be4dc1b7e52392d5d348e8666d2964 (diff)
downloadrneovim-bb574e22028b448f25e7e2b5c1df6f45b32c3f79.tar.gz
rneovim-bb574e22028b448f25e7e2b5c1df6f45b32c3f79.tar.bz2
rneovim-bb574e22028b448f25e7e2b5c1df6f45b32c3f79.zip
restore 'Not Implemented' for legacy script commands (:lua :ruby ...)
- restores behavior equivalent to Vim compiled without FEAT_MZSCHEME, etc. (avoids spurious "E492: Not an editor command: EOF") for code such as: ```vim if 0 perl << EOF end EOF endif ``` see :help script-here - fixes #1308 - fixes https://github.com/junegunn/vim-plug/issues/111
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 359c4b31d1..ca79270fcc 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -138,7 +138,6 @@ struct dbg_stuff {
# include "ex_docmd.c.generated.h"
#endif
-# define HAVE_EX_SCRIPT_NI
# define ex_gui ex_nogui
# define ex_tearoff ex_ni
# define ex_popup ex_ni
@@ -1494,9 +1493,7 @@ static char_u * do_one_cmd(char_u **cmdlinep,
ni = (!IS_USER_CMDIDX(ea.cmdidx)
&& (cmdnames[ea.cmdidx].cmd_func == ex_ni
-#ifdef HAVE_EX_SCRIPT_NI
|| cmdnames[ea.cmdidx].cmd_func == ex_script_ni
-#endif
));
@@ -1832,19 +1829,26 @@ static char_u * do_one_cmd(char_u **cmdlinep,
case CMD_leftabove:
case CMD_let:
case CMD_lockmarks:
+ case CMD_lua:
case CMD_match:
+ case CMD_mzscheme:
case CMD_noautocmd:
case CMD_noswapfile:
+ case CMD_perl:
case CMD_psearch:
case CMD_python:
+ case CMD_py3:
+ case CMD_python3:
case CMD_return:
case CMD_rightbelow:
+ case CMD_ruby:
case CMD_silent:
case CMD_smagic:
case CMD_snomagic:
case CMD_substitute:
case CMD_syntax:
case CMD_tab:
+ case CMD_tcl:
case CMD_throw:
case CMD_tilde:
case CMD_topleft:
@@ -1854,7 +1858,8 @@ static char_u * do_one_cmd(char_u **cmdlinep,
case CMD_wincmd:
break;
- default: goto doend;
+ default:
+ goto doend;
}
}
@@ -3291,9 +3296,7 @@ static void get_flags(exarg_T *eap)
}
}
-/*
- * Function called for command which is Not Implemented. NI!
- */
+/// Stub function for command which is Not Implemented. NI!
void ex_ni(exarg_T *eap)
{
if (!eap->skip)
@@ -3301,11 +3304,8 @@ void ex_ni(exarg_T *eap)
"E319: Sorry, the command is not available in this version");
}
-#ifdef HAVE_EX_SCRIPT_NI
-/*
- * Function called for script command which is Not Implemented. NI!
- * Skips over ":perl <<EOF" constructs.
- */
+/// Stub function for script command which is Not Implemented. NI!
+/// Skips over ":perl <<EOF" constructs.
static void ex_script_ni(exarg_T *eap)
{
if (!eap->skip)
@@ -3313,7 +3313,6 @@ static void ex_script_ni(exarg_T *eap)
else
free(script_get(eap, eap->arg));
}
-#endif
/*
* Check range in Ex command for validity.