diff options
author | ZyX <kp-pav@yandex.ru> | 2014-06-14 00:31:55 +0400 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2014-08-20 20:21:37 +0400 |
commit | 3becb5fd21c45bb58e27768ce900da8abc4dbc73 (patch) | |
tree | e5a7f8da7b691d3d355d20de312da8404a8ef7c2 /src/nvim/ex_docmd.c | |
parent | bbefc73c553d681f78f40df9d97ec89ae9b06520 (diff) | |
download | rneovim-3becb5fd21c45bb58e27768ce900da8abc4dbc73.tar.gz rneovim-3becb5fd21c45bb58e27768ce900da8abc4dbc73.tar.bz2 rneovim-3becb5fd21c45bb58e27768ce900da8abc4dbc73.zip |
Use lua generator in place of ex_cmds_defs header trick
Closes #788
Fixes #379
Ref #549
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 40 |
1 files changed, 4 insertions, 36 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 446d51be3f..ab7add1c5b 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -66,6 +66,7 @@ #include "nvim/version.h" #include "nvim/window.h" #include "nvim/os/os.h" +#include "nvim/ex_cmds_defs.h" static int quitmore = 0; static int ex_pressedreturn = FALSE; @@ -156,42 +157,9 @@ static int did_lcd; /* whether ":lcd" was produced for a session */ /* * Declare cmdnames[]. */ -#define DO_DECLARE_EXCMD -#include "nvim/ex_cmds_defs.h" - -/* - * Table used to quickly search for a command, based on its first character. - */ -static cmdidx_T cmdidxs[27] = -{ - CMD_append, - CMD_buffer, - CMD_change, - CMD_delete, - CMD_edit, - CMD_file, - CMD_global, - CMD_help, - CMD_insert, - CMD_join, - CMD_k, - CMD_list, - CMD_move, - CMD_next, - CMD_open, - CMD_print, - CMD_quit, - CMD_read, - CMD_substitute, - CMD_t, - CMD_undo, - CMD_vglobal, - CMD_write, - CMD_xit, - CMD_yank, - CMD_z, - CMD_bang -}; +#ifdef INCLUDE_GENERATED_DECLARATIONS +# include "ex_cmds_defs.generated.h" +#endif static char_u dollar_command[2] = {'$', 0}; |