vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 3208cfc921fafb0fcd75e8d6908f467c0d1fa086 parent 065b7348791ebcbdfcabacfbab6ac17299986489 Author: Marc André Tanner <mat@brain-dump.org> Date: Wed, 31 Jan 2018 13:22:18 +0100 vis-lua: implement vis:redraw() Diffstat:
| M | vis-lua.c | | | 13 | +++++++++++++ |
1 file changed, 13 insertions(+), 0 deletions(-)
diff --git a/vis-lua.c b/vis-lua.c @@ -1359,6 +1359,18 @@ static int pipe_func(lua_State *L) { return 3; } /*** + * Redraw complete user interface. + * + * Will trigger redraw events, make sure to avoid recursive events. + * + * @function draw + */ +static int redraw(lua_State *L) { + Vis *vis = obj_ref_check(L, 1, "vis"); + vis_redraw(vis); + return 0; +} +/*** * Currently active window. * @tfield Window win * @see windows @@ -1480,6 +1492,7 @@ static const struct luaL_Reg vis_lua[] = { { "action_register", action_register }, { "exit", exit_func }, { "pipe", pipe_func }, + { "redraw", redraw }, { "__index", vis_index }, { "__newindex", vis_newindex }, { NULL, NULL },