From 29f8d2488cfe86678e65e73c58e36d7c48a0e11b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 21 May 2016 12:29:59 +0200 Subject: vis: consider :set horizon setting when syntax highlighting --- vis-lua.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'vis-lua.c') diff --git a/vis-lua.c b/vis-lua.c index c239f63..ad017b1 100644 --- a/vis-lua.c +++ b/vis-lua.c @@ -28,7 +28,7 @@ void vis_lua_file_save(Vis *vis, File *file) { } void vis_lua_file_close(Vis *vis, File *file) { } void vis_lua_win_open(Vis *vis, Win *win) { } void vis_lua_win_close(Vis *vis, Win *win) { } -void vis_lua_win_highlight(Vis *vis, Win *win) { } +void vis_lua_win_highlight(Vis *vis, Win *win, size_t horizon) { } bool vis_lua_win_syntax(Vis *vis, Win *win, const char *syntax) { return true; } bool vis_theme_load(Vis *vis, const char *name) { return true; } @@ -1276,12 +1276,13 @@ void vis_lua_win_close(Vis *vis, Win *win) { lua_pop(L, 1); } -void vis_lua_win_highlight(Vis *vis, Win *win) { +void vis_lua_win_highlight(Vis *vis, Win *win, size_t horizon) { lua_State *L = vis->lua; vis_lua_event_get(L, "win_highlight"); if (lua_isfunction(L, -1)) { obj_ref_new(L, win, "vis.window"); - pcall(vis, L, 1, 0); + lua_pushunsigned(L, horizon); + pcall(vis, L, 2, 0); } lua_pop(L, 1); } -- cgit v1.2.3