diff options
Diffstat (limited to 'vis-lua.c')
| -rw-r--r-- | vis-lua.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2019,6 +2019,12 @@ static int window_newindex(lua_State *L) { } lua_pop(L, 1); return ret; + } else if (strcmp(key, "file") == 0 && lua_isstring(L, 3)) { + const char* filename = lua_tostring(L, 3); + if (!vis_window_change_file(win, filename)) { + return luaL_argerror(L, 3, "failed to open"); + } + return 0; } } |
