Evas textblock: Fixed a bug in _paragraph_char_last with the last par.

SVN revision: 61205
This commit is contained in:
Tom Hacohen 2011-07-10 13:22:33 +00:00
parent b6fd1539e8
commit d30603e37f
1 changed files with 6 additions and 1 deletions

View File

@ -5667,7 +5667,12 @@ evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur)
if (!cur) return;
if (!cur->node) return;
ind = eina_ustrbuf_length_get(cur->node->unicode) - 1;
ind = eina_ustrbuf_length_get(cur->node->unicode);
/* If it's not the last paragraph, go back one, because we want to point
* to the PS, not the NULL */
if (EINA_INLIST_GET(cur->node)->next)
ind--;
if (ind >= 0)
cur->pos = ind;
else