aboutsummaryrefslogtreecommitdiff
path: root/vis-lua.c
diff options
context:
space:
mode:
authorAlexandre Rames <alexandre.rames@uop.re>2017-02-27 21:29:35 -0800
committerAlexandre Rames <alexandre.rames@uop.re>2017-02-27 21:29:35 -0800
commitff4c5d4d37e7e9dbd5b39904e9be19fa41c3ec0d (patch)
tree0547fe67648554abe6b23500f1e13cd27af7c14e /vis-lua.c
parent661dbb2c9eb4249d1083b838c432e183a8c633c3 (diff)
downloadvis-ff4c5d4d37e7e9dbd5b39904e9be19fa41c3ec0d.tar.gz
vis-ff4c5d4d37e7e9dbd5b39904e9be19fa41c3ec0d.tar.xz
vis-lua: make vis:win assignable
Diffstat (limited to 'vis-lua.c')
-rw-r--r--vis-lua.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vis-lua.c b/vis-lua.c
index 7822ccb..f4a1955 100644
--- a/vis-lua.c
+++ b/vis-lua.c
@@ -1169,6 +1169,11 @@ static int vis_newindex(lua_State *L) {
vis_count_set(vis, count);
return 1;
}
+
+ if (strcmp(key, "win") == 0) {
+ vis_window_focus(obj_ref_check(L, 3, VIS_LUA_TYPE_WINDOW));
+ return 0;
+ }
}
return newindex_common(L);
}