diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-05-21 12:29:59 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-05-22 00:05:30 +0200 |
| commit | 29f8d2488cfe86678e65e73c58e36d7c48a0e11b (patch) | |
| tree | bc58ec4a206c1a5d393a67837acb5ea1cce02193 /vis-lua.c | |
| parent | b36ddb65334b4de406304786abfbde85b1e9a4e4 (diff) | |
| download | vis-29f8d2488cfe86678e65e73c58e36d7c48a0e11b.tar.gz vis-29f8d2488cfe86678e65e73c58e36d7c48a0e11b.tar.xz | |
vis: consider :set horizon setting when syntax highlighting
Diffstat (limited to 'vis-lua.c')
| -rw-r--r-- | vis-lua.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); } |
