diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-08-21 10:07:46 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-08-21 10:07:46 -0400 |
commit | 51ae9c643744995c2d3b6a466b6ad2333e1cba8c (patch) | |
tree | f10ccdc877b0d2fd546dfd6debf7bd877835facd /src/nvim/ex_docmd.c | |
parent | fe706a9d1b368ae141a18949349c3382f0070ba9 (diff) | |
parent | de58394f34a5e74e9c20027505ee1fd70deabfdd (diff) | |
download | rneovim-51ae9c643744995c2d3b6a466b6ad2333e1cba8c.tar.gz rneovim-51ae9c643744995c2d3b6a466b6ad2333e1cba8c.tar.bz2 rneovim-51ae9c643744995c2d3b6a466b6ad2333e1cba8c.zip |
Merge pull request #840 from ZyX-I/generate-ex_cmds
Use lua generator in place of ex_cmds_defs header trick
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}; |