From 13a95942b6e33033e4bbbe27cc8cafc98c6924a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 20 Dec 2015 11:04:20 +0100 Subject: vis: refactor Lua integration Lua support can now be disabled at compile time using: $ make CONFIG_LUA=0 This commit also adds an initial Lua API and provides a few default hooks. We now also require Lua >= 5.2 due to the uservalue constructs. In principle the same functionality could be implemented using function environments from Lua 5.1. --- vis-cmds.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vis-cmds.c') diff --git a/vis-cmds.c b/vis-cmds.c index 477e29c..3a89d2a 100644 --- a/vis-cmds.c +++ b/vis-cmds.c @@ -595,6 +595,8 @@ static bool cmd_write(Vis *vis, Filerange *range, enum CmdOpt opt, const char *a } if (strcmp(file->name, *name) == 0) file->stat = text_stat(text); + if (vis->event && vis->event->file_save) + vis->event->file_save(vis, file); } return true; } -- cgit v1.2.3