diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-03-19 12:29:13 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-03-19 14:58:07 +0100 |
| commit | f295bba61f97ff0d3d43fcc156b78856f715ffad (patch) | |
| tree | 74c8ab9561d7dd026595525dad58a8ec38b0c5d6 /vis-lua.c | |
| parent | 0102293b417d2adc5c4eeff78a9d31f61c9dd6ff (diff) | |
| download | vis-f295bba61f97ff0d3d43fcc156b78856f715ffad.tar.gz vis-f295bba61f97ff0d3d43fcc156b78856f715ffad.tar.xz | |
Move :set horizon option implementaiton to lua
Diffstat (limited to 'vis-lua.c')
| -rw-r--r-- | vis-lua.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -159,7 +159,7 @@ void vis_lua_file_save_post(Vis *vis, File *file, const char *path) { } 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, size_t horizon) { } +void vis_lua_win_highlight(Vis *vis, Win *win) { } void vis_lua_win_status(Vis *vis, Win *win) { window_status_update(vis, win); } #else @@ -2713,16 +2713,14 @@ void vis_lua_win_close(Vis *vis, Win *win) { * The window has been redrawn and the syntax highlighting needs to be performed. * @function win_highlight * @tparam Window win the window being redrawn - * @tparam int horizon the maximal number of bytes the lexer should look behind to synchronize parsing state * @see style */ -void vis_lua_win_highlight(Vis *vis, Win *win, size_t horizon) { +void vis_lua_win_highlight(Vis *vis, Win *win) { lua_State *L = vis->lua; vis_lua_event_get(L, "win_highlight"); if (lua_isfunction(L, -1)) { obj_ref_new(L, win, VIS_LUA_TYPE_WINDOW); - lua_pushunsigned(L, horizon); - pcall(vis, L, 2, 0); + pcall(vis, L, 1, 0); } lua_pop(L, 1); } |
