Evas textblock: Fixed a bug in newline compatible mode.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 7 Apr 2011 13:13:41 +0000 (13:13 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 7 Apr 2011 13:13:41 +0000 (13:13 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@58447 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c

index 244f068..47e9992 100644 (file)
@@ -2987,7 +2987,12 @@ _layout_do_format(const Evas_Object *obj __UNUSED__, Ctxt *c,
                     {
                        Evas_Object_Textblock_Format_Item *fi;
 
-                       fi = _layout_format_item_add(c, n, item, fmt);
+                       /* If in compatible mode, insert a ps */
+                       if (c->o->newline_is_ps)
+                          fi = _layout_format_item_add(c, n, "ps", fmt);
+                       else
+                          fi = _layout_format_item_add(c, n, item, fmt);
+
                        fi->parent.w = fi->parent.adv = 0;
                     }
                   else if ((!strcmp(item, "\t")) || (!strcmp(item, "\\t")))