Evas textblock: Don't try to move text if the length to be moved is 0.

SVN revision: 59813
This commit is contained in:
Tom Hacohen 2011-05-30 13:19:03 +00:00
parent 56b6e2ed28
commit 943145d125
1 changed files with 7 additions and 4 deletions

View File

@ -6436,11 +6436,14 @@ _evas_textblock_cursor_break_paragraph(Evas_Textblock_Cursor *cur,
/* cur->pos now points to the PS, move after. */
start = cur->pos + 1;
text = eina_ustrbuf_string_get(cur->node->unicode);
len = eina_ustrbuf_length_get(cur->node->unicode) - start;
eina_ustrbuf_append_length(n->unicode, text + start, len);
eina_ustrbuf_remove(cur->node->unicode, start, start + len);
cur->node->dirty = EINA_TRUE;
if (len > 0)
{
text = eina_ustrbuf_string_get(cur->node->unicode);
eina_ustrbuf_append_length(n->unicode, text + start, len);
eina_ustrbuf_remove(cur->node->unicode, start, start + len);
cur->node->dirty = EINA_TRUE;
}
}
else
{