From a96344fb241c4dc12cdfbba3020663fba4d9f3f0 Mon Sep 17 00:00:00 2001 From: tasn Date: Sun, 15 May 2011 13:57:47 +0000 Subject: [PATCH] Evas textblock: Fixed a possible bug with wordwrap. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@59405 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_textblock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index b1b8d90..4102ce2 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -382,7 +382,6 @@ struct _Evas_Textblock_Cursor Evas_Object *obj; size_t pos; Evas_Object_Textblock_Node_Text *node; - }; struct _Evas_Object_Textblock @@ -3120,7 +3119,7 @@ _layout_get_word_mixwrap_common(Ctxt *c, Evas_Object_Textblock_Format *fmt, } if ((wrap > line_start) || - ((wrap == line_start) && (ALLOW_BREAK(wrap)))) + ((wrap == line_start) && (ALLOW_BREAK(wrap)) && (wrap < len))) { /* We found a suitable wrapping point, break here. */ MOVE_NEXT_UNTIL(len, wrap); @@ -3153,7 +3152,7 @@ _layout_get_word_mixwrap_common(Ctxt *c, Evas_Object_Textblock_Format *fmt, } - if (wrap < len) + if ((wrap < len) && (wrap > line_start)) { MOVE_NEXT_UNTIL(len, wrap); return wrap; @@ -3411,6 +3410,7 @@ _layout_visualize_par(Ctxt *c) /*FIXME: I should handle format correctly, i.e verify we are allowed to break here */ _layout_line_advance(c, it->format); + wrap = -1; } } else @@ -3472,7 +3472,7 @@ _layout_visualize_par(Ctxt *c) item */ i = eina_list_prev(i); it = eina_list_data_get(i); - while (uwrap <= it->text_pos) + while (uwrap < it->text_pos) { c->ln->items = _ITEM( eina_inlist_remove( -- 2.7.4