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

SVN revision: 51709
This commit is contained in:
Tom Hacohen 2010-08-29 08:27:13 +00:00
parent 3ab29fcad0
commit 71490cad70
1 changed files with 2 additions and 2 deletions

View File

@ -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;