diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-03-24 13:38:34 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-03-24 13:46:59 +0100 |
| commit | d555c905bfd2aed879a912da7b4446b6374981ee (patch) | |
| tree | dab0f2d3fbf262f6cb2ba79f2e3d5fb7d4455a09 | |
| parent | f3fd9c3cd1f2e15e89f9cd96d07c1ba957ae7c89 (diff) | |
| download | vis-d555c905bfd2aed879a912da7b4446b6374981ee.tar.gz vis-d555c905bfd2aed879a912da7b4446b6374981ee.tar.xz | |
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.
| -rw-r--r-- | vis-lua.c | 6 | ||||
| -rw-r--r-- | vis.c | 2 |
2 files changed, 4 insertions, 4 deletions
@@ -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); @@ -108,7 +108,7 @@ bool vis_event_emit(Vis *vis, enum VisEvents id, ...) { case VIS_EVENT_WIN_STATUS: { Win *win = va_arg(ap, Win*); - if (win->file->internal) + if (win->file->internal && id != VIS_EVENT_WIN_STATUS) break; if (vis->event->win_open && id == VIS_EVENT_WIN_OPEN) { vis->event->win_open(vis, win); |
