From 50b49e661aea8d7b9873a9e84a51f72b3121ad52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 16 May 2018 18:35:06 +0200 Subject: vis-lua: expose current input_queue content --- vis-lua.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vis-lua.c b/vis-lua.c index 70c3996..0031421 100644 --- a/vis-lua.c +++ b/vis-lua.c @@ -1368,6 +1368,10 @@ static int pipe_func(lua_State *L) { * Whether a macro is being recorded. * @tfield bool recording */ +/*** + * Currently unconsumed keys in the input queue. + * @tfield string input_queue + */ static int vis_index(lua_State *L) { Vis *vis = obj_ref_check(L, 1, "vis"); @@ -1386,6 +1390,11 @@ static int vis_index(lua_State *L) { return 1; } + if (strcmp(key, "input_queue") == 0) { + lua_pushstring(L, buffer_content0(&vis->input_queue)); + return 1; + } + if (strcmp(key, "recording") == 0) { lua_pushboolean(L, vis_macro_recording(vis)); return 1; -- cgit v1.2.3