textbox: Throw a lua error on invalid markup

Idea by JD, inspired from a patch by farhaven.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-07-16 19:16:04 +02:00
parent 0655f13615
commit 62a0189f05
1 changed files with 3 additions and 0 deletions

View File

@ -414,6 +414,9 @@ luaA_textbox_newindex(lua_State *L, awesome_token_t token)
}
d->extents = draw_text_extents(&d->data);
if(!success)
luaL_error(L, "Invalid markup in '%s'", buf);
}
else
p_clear(&d->extents, 1);