aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-03-10 17:38:33 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-03-27 23:43:17 -0400
commit07a5c9d4f0b8e72349bb4406f39b8fd2daa74af7 (patch)
treeb6f31d8f7aae9e2fa3cebdd84b99dd7f0be7c6d3 /src
parentc3158e230deec5039f33477aa4aa78f5f8ad25af (diff)
downloadrneovim-07a5c9d4f0b8e72349bb4406f39b8fd2daa74af7.tar.gz
rneovim-07a5c9d4f0b8e72349bb4406f39b8fd2daa74af7.tar.bz2
rneovim-07a5c9d4f0b8e72349bb4406f39b8fd2daa74af7.zip
vim-patch:8.0.0506: can't build with ANSI C
Problem: Can't build with ANSI C. Solution: Move declarations to start of block. https://github.com/vim/vim/commit/6c0c1e8052811a818739e2f3d543291b7a347ad0
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_docmd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 1bd3b004f0..e91b6b6470 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -2443,6 +2443,9 @@ static char_u *find_command(exarg_T *eap, int *full)
}
if (ASCII_ISLOWER(eap->cmd[0])) {
+ const int c1 = eap->cmd[0];
+ 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'"));
getout(1);
@@ -2450,8 +2453,6 @@ static char_u *find_command(exarg_T *eap, int *full)
// Use a precomputed index for fast look-up in cmdnames[]
// taking into account the first 2 letters of eap->cmd.
- const int c1 = eap->cmd[0];
- const int c2 = eap->cmd[1];
eap->cmdidx = cmdidxs1[CharOrdLow(c1)];
if (ASCII_ISLOWER(c2)) {
eap->cmdidx += cmdidxs2[CharOrdLow(c1)][CharOrdLow(c2)];