diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2018-05-16 18:35:06 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2018-05-17 21:51:33 +0200 |
| commit | 50b49e661aea8d7b9873a9e84a51f72b3121ad52 (patch) | |
| tree | f2af5c468c43324dfb3fab805cc11a171f7c38f9 | |
| parent | f4832217ce7c6082a90418aed6db5dc201553521 (diff) | |
| download | vis-50b49e661aea8d7b9873a9e84a51f72b3121ad52.tar.gz vis-50b49e661aea8d7b9873a9e84a51f72b3121ad52.tar.xz | |
vis-lua: expose current input_queue content
| -rw-r--r-- | vis-lua.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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; |
