aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-11-21 17:08:29 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-11-21 17:08:29 -0300
commitaf5eaf22c529205ea75665df4a917b9294419f12 (patch)
treed204eca11f8ea4fa128016f68a1bc0f8af62ff18 /src/nvim/normal.c
parent2c29b20af767bd7ebebeb41da14df4d66a19d5a0 (diff)
parentf09a33bbc131138f67aa13752559ade2d4e577c2 (diff)
downloadrneovim-af5eaf22c529205ea75665df4a917b9294419f12.tar.gz
rneovim-af5eaf22c529205ea75665df4a917b9294419f12.tar.bz2
rneovim-af5eaf22c529205ea75665df4a917b9294419f12.zip
Merge PR #1518 'Improve functional tests and perform explicit K_EVENT handling'
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r--src/nvim/normal.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 29070ff188..f58e044c2c 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -312,7 +312,6 @@ static const struct nv_cmd {
{K_F8, farsi_fkey, 0, 0},
{K_F9, farsi_fkey, 0, 0},
{K_CURSORHOLD, nv_cursorhold, NV_KEEPREG, 0},
- {K_EVENT, nv_event, NV_KEEPREG, 0},
};
/* Number of commands in nv_cmds[]. */
@@ -483,7 +482,15 @@ normal_cmd (
/*
* Get the command character from the user.
*/
+ event_enable_deferred();
c = safe_vgetc();
+ event_disable_deferred();
+
+ if (c == K_EVENT) {
+ event_process();
+ return;
+ }
+
LANGMAP_ADJUST(c, true);
/*
@@ -7373,8 +7380,3 @@ static void nv_cursorhold(cmdarg_T *cap)
did_cursorhold = true;
cap->retval |= CA_COMMAND_BUSY; /* don't call edit() now */
}
-
-static void nv_event(cmdarg_T *cap)
-{
- event_process();
-}