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 ba518f9381
commit 711d78b50c
1 changed files with 3 additions and 0 deletions

View File

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