From bcfc3656abf3c2a48c254b7d1b63253a1e1964fa Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 11 Aug 2008 17:16:46 +0200 Subject: [PATCH] screen: export tags array Signed-off-by: Julien Danjou --- screen.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/screen.c b/screen.c index 17ad2e27..2844e113 100644 --- a/screen.c +++ b/screen.c @@ -247,6 +247,7 @@ luaA_screen_index(lua_State *L) const char *buf = luaL_checklstring(L, 2, &len); screen_t *s; area_t g; + int i; s = lua_touserdata(L, 1); @@ -287,6 +288,14 @@ luaA_screen_index(lua_State *L) lua_pushnumber(L, g.height); lua_setfield(L, -2, "height"); break; + case A_TK_TAGS: + lua_newtable(L); + for(i = 0; i < s->tags.len; i++) + { + luaA_tag_userdata_new(L, s->tags.tab[i]); + lua_rawseti(L, -2, i + 1); + } + break; default: return 0; }