aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2020-08-14 10:03:17 -0400
committerGitHub <noreply@github.com>2020-08-14 10:03:17 -0400
commit3ccdbc570d856ee3ff1f64204e352a40b9030ac2 (patch)
treee73d198bef4dce52bfd990dc57ea419e8b1fc703 /src/nvim/getchar.c
parentaa48c1c724f7164485782a3a5a8ff7a94373f607 (diff)
downloadrneovim-3ccdbc570d856ee3ff1f64204e352a40b9030ac2.tar.gz
rneovim-3ccdbc570d856ee3ff1f64204e352a40b9030ac2.tar.bz2
rneovim-3ccdbc570d856ee3ff1f64204e352a40b9030ac2.zip
lua: add vim.register_keystroke_callback (#12536)
* feat: Add vim.register_keystroke_callback * fixup: Forgot to remove mention of old option * fixup: Answer jamessan comments * fixup: Answer norcalli comments * fixup: portability * Update runtime/doc/lua.txt Co-authored-by: Ashkan Kiani <ashkan.k.kiani@gmail.com>
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 5ab5a7db1b..dc11e4a232 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -27,6 +27,7 @@
#include "nvim/ex_docmd.h"
#include "nvim/ex_getln.h"
#include "nvim/func_attr.h"
+#include "nvim/lua/executor.h"
#include "nvim/main.h"
#include "nvim/mbyte.h"
#include "nvim/memline.h"
@@ -1535,6 +1536,9 @@ int vgetc(void)
*/
may_garbage_collect = false;
+ // Exec lua callbacks for on_keystroke
+ nlua_execute_log_keystroke(c);
+
return c;
}