Evas textblock: Fix a potential bug in wrapping.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 17 May 2011 07:08:33 +0000 (07:08 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 17 May 2011 07:08:33 +0000 (07:08 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@59464 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c

index fc1eff7..7b4525f 100644 (file)
@@ -3488,7 +3488,10 @@ _layout_visualize_par(Ctxt *c)
                                           EINA_INLIST_GET(it)));
                                  continue;
                               }
-                            else if (uwrap >= ti->parent.text_pos +
+                            /* If it points to the end, it means the previous
+                             * char is a whitespace we should remove, so this
+                             * is a wanted cutting point. */
+                            else if (uwrap > ti->parent.text_pos +
                                   ti->text_props.text_len)
                                wrap = -1; /* Delay the cut in a smart way
                                i.e use the item_pos as the line_start, because