diff options
author | Jeffrey Lee <me@phlamethrower.co.uk> | 2006-09-10 13:59:19 +0000 |
---|---|---|
committer | Jeffrey Lee <me@phlamethrower.co.uk> | 2006-09-10 13:59:19 +0000 |
commit | f2cd31779b76bbe070a93b5a609011ca3b86f4d8 (patch) | |
tree | 28e73ad4e7a2979b93d1c07f8ef7df753cd1967e /render | |
parent | 271c28a5df7f9e1634f7f35b9a61e7ce3e02cf34 (diff) | |
download | netsurf-f2cd31779b76bbe070a93b5a609011ca3b86f4d8.tar.gz netsurf-f2cd31779b76bbe070a93b5a609011ca3b86f4d8.tar.bz2 |
Fixed textarea wordwrap if first character on line is a space
svn path=/trunk/netsurf/; revision=2941
Diffstat (limited to 'render')
-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) |