Evas textblock: Fixed setting cursor in evas_textblock_cursor_paragraph_char_last.

On empty paragraphs the cursor position was set to values < 0 which
is bad and caused issues in other places as well.

SVN revision: 57229
This commit is contained in:
Tom Hacohen 2011-02-22 09:31:19 +00:00
parent 5117d0f912
commit 7420939ddb
1 changed files with 4 additions and 1 deletions

View File

@ -5401,7 +5401,10 @@ evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur)
if (!cur) return;
if (!cur->node) return;
index = eina_ustrbuf_length_get(cur->node->unicode) - 1;
cur->pos = index;
if (index >= 0)
cur->pos = index;
else
cur->pos = 0;
}