fix last newline detection - dont keep adding them in!
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 22 Oct 2008 04:00:05 +0000 (04:00 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 22 Oct 2008 04:00:05 +0000 (04:00 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@36950 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/edje_entry.c

index 09b3ec4..8c198e6 100644 (file)
@@ -1182,10 +1182,15 @@ _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text)
    _sel_clear(en->cursor, rp->object, en);
    evas_object_textblock_text_markup_set(rp->object, text); 
    evas_textblock_cursor_node_last(en->cursor);
-   if ((!evas_textblock_cursor_node_format_get(en->cursor)) ||
-       (!strcmp(evas_textblock_cursor_node_format_get(en->cursor), "\n")) ||
-       (!strcmp(evas_textblock_cursor_node_format_get(en->cursor), "\\n")))
-     evas_textblock_cursor_format_append(en->cursor, "\n");
+   if (!evas_textblock_cursor_node_format_get(en->cursor))
+     {
+       evas_textblock_cursor_format_append(en->cursor, "\n");
+     }
+   else if (!((!strcmp(evas_textblock_cursor_node_format_get(en->cursor), "\n")) ||
+             (!strcmp(evas_textblock_cursor_node_format_get(en->cursor), "\\n"))))
+     {
+       evas_textblock_cursor_format_append(en->cursor, "\n");
+     }
    _anchors_get(en->cursor, rp->object, en);
    _edje_emit(rp->edje, "entry,changed", rp->part->name);
    _edje_entry_set_cursor_start(rp);