From e8a6f21e27d8a4d4064c78b140044aeaa2ed36cc Mon Sep 17 00:00:00 2001 From: tasn Date: Sun, 29 Aug 2010 08:27:13 +0000 Subject: [PATCH] Evas textblock: Fixed segfault when clearing a textblock and then trying to delete while it's empty. And fixed cursor position in cases when there's a visible format after a \n git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@51709 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_textblock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index 6f4fb21..88adff9 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -3057,7 +3057,7 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_ _layout_text_append(c, fmt, n, start, -1, o->repch); } /* Advance the line so it'll calculate the size */ - if ((c->ln) && (c->ln->items) && (fmt)) + if ((c->ln) && (c->ln->items || c->ln->format_items) && (fmt)) _layout_line_advance(c, fmt); /* Clean the rest of the format stack */ @@ -5975,7 +5975,7 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur) const Eina_Unicode *text; int chr, index, ppos; - if (!cur) return; + if (!cur || !cur->node) return; o = (Evas_Object_Textblock *)(cur->obj->object_data); n = cur->node; -- 2.7.4