Evas textblock: Fix a potential bug in wrapping.
authorTom Hacohen <tom@stosb.com>
Tue, 17 May 2011 07:08:33 +0000 (07:08 +0000)
committerTom Hacohen <tom@stosb.com>
Tue, 17 May 2011 07:08:33 +0000 (07:08 +0000)
SVN revision: 59464

legacy/evas/src/lib/canvas/evas_object_textblock.c

index fc1eff758f33f6e5a3ccbc6aa349279fc129e381..7b4525fa91af053ad0afcf6349200eaab514d522 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