screen: export tags array
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
abd0216194
commit
bcfc3656ab
9
screen.c
9
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue