aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-03-10 17:41:18 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-03-28 07:56:21 -0400
commit63025a1d65bf7dbfcf4f3d543c1da9b0d34ebd56 (patch)
tree9b79dcc754e4695596fb0aa8913f853199a1aaf7 /src/nvim/ex_docmd.c
parent07a5c9d4f0b8e72349bb4406f39b8fd2daa74af7 (diff)
downloadrneovim-63025a1d65bf7dbfcf4f3d543c1da9b0d34ebd56.tar.gz
rneovim-63025a1d65bf7dbfcf4f3d543c1da9b0d34ebd56.tar.bz2
rneovim-63025a1d65bf7dbfcf4f3d543c1da9b0d34ebd56.zip
gen_ex_cmds.lua: build the command table
Lua port of create_cmdidxs.vim from 8.0.0572 N/A: vim-patch:8.0.0572: building the command table requires Perl Problem: Building the command table requires Perl. Solution: Use a Vim script solution. (Dominique Pelle, closes vim/vim#1641) https://github.com/vim/vim/commit/6de5e126018b6f92526795cc06b1d73fac965db1
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index e91b6b6470..037b5dec7f 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -155,8 +155,6 @@ struct dbg_stuff {
# include "ex_cmds_defs.generated.h"
#endif
-static const int command_count = 539;
-
static char_u dollar_command[2] = {'$', 0};
static void save_dbg_stuff(struct dbg_stuff *dsp)
@@ -2265,8 +2263,11 @@ static char_u * do_one_cmd(char_u **cmdlinep,
need_rethrow = check_cstack = FALSE;
doend:
- if (curwin->w_cursor.lnum == 0) /* can happen with zero line number */
+ // can happen with zero line number
+ if (curwin->w_cursor.lnum == 0) {
curwin->w_cursor.lnum = 1;
+ curwin->w_cursor.col = 0;
+ }
if (errormsg != NULL && *errormsg != NUL && !did_emsg) {
if (flags & DOCMD_VERBOSE) {
@@ -2447,7 +2448,7 @@ static char_u *find_command(exarg_T *eap, int *full)
const int c2 = eap->cmd[1];
if (command_count != (int)CMD_SIZE) {
- iemsg((char_u *)_("E943: Command table needs to be updated, run 'make cmdidxs'"));
+ iemsg((char *)_("E943: Command table needs to be updated, run 'make'"));
getout(1);
}