From d555c905bfd2aed879a912da7b4446b6374981ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Fri, 24 Mar 2017 13:38:34 +0100 Subject: vis: properly redraw status bar of windows displaying internal files Currently the only "internal window" with a status bar is the information window used to display Lua stack traces. We do not want to trigger events for it, because that could result in further Lua errors. Nonetheless its status bar should be properly redrawn to avoid display artifacts. That is why we fall back to the built-in default status bar as used by non-Lua builds. --- vis-lua.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vis-lua.c') diff --git a/vis-lua.c b/vis-lua.c index dbb5d86..b388632 100644 --- a/vis-lua.c +++ b/vis-lua.c @@ -227,8 +227,6 @@ static int panic_handler(lua_State *L) { if (ud) { Vis *vis = ud; vis->lua = NULL; - if (vis->event) - vis->event->win_status = window_status_update; const char *msg = NULL; if (lua_type(L, -1) == LUA_TSTRING) msg = lua_tostring(L, -1); @@ -2845,8 +2843,10 @@ void vis_lua_win_highlight(Vis *vis, Win *win) { */ void vis_lua_win_status(Vis *vis, Win *win) { lua_State *L = vis->lua; - if (!L) + if (!L || win->file->internal) { + window_status_update(vis, win); return; + } vis_lua_event_get(L, "win_status"); if (lua_isfunction(L, -1)) { obj_ref_new(L, win, VIS_LUA_TYPE_WINDOW); -- cgit v1.2.3