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
0655f13615
commit
62a0189f05
|
@ -414,6 +414,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