diff options
Diffstat (limited to 'render/layout.c')
-rw-r--r-- | render/layout.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/render/layout.c b/render/layout.c index 38af06208..03f68b109 100644 --- a/render/layout.c +++ b/render/layout.c @@ -1279,7 +1279,12 @@ bool layout_line(struct box *first, int *width, int *y, split_box->type == BOX_TEXT) && !split_box->object && !split_box->gadget && split_box->text) { + /* skip leading spaces, otherwise code gets fooled into thinking it's all one long word */ for (i = 0; i != split_box->length && + split_box->text[i] == ' '; i++) + ; + /* find end of word */ + for (; i != split_box->length && split_box->text[i] != ' '; i++) ; if (i != split_box->length) |