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:
parent
ba518f9381
commit
711d78b50c
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue