Author: phlamethrower
Date: Sun Sep 10 14:59:19 2006
New Revision: 2941
URL:
http://svn.semichrome.net?rev=2941&view=rev
Log:
Fixed textarea wordwrap if first character on line is a space
Modified:
trunk/netsurf/render/layout.c
Modified: trunk/netsurf/render/layout.c
URL:
http://svn.semichrome.net/trunk/netsurf/render/layout.c?rev=2941&r1=2...
==============================================================================
--- trunk/netsurf/render/layout.c (original)
+++ trunk/netsurf/render/layout.c Sun Sep 10 14:59:19 2006
@@ -1279,7 +1279,12 @@
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)