Evas textblock: Fixed cursor_paragraph_text_length_get.

SVN revision: 61206
This commit is contained in:
Tom Hacohen 2011-07-10 13:22:38 +00:00
parent d30603e37f
commit 9fe4504574
1 changed files with 7 additions and 1 deletions

View File

@ -7222,9 +7222,15 @@ evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur)
EAPI int
evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur)
{
int len;
if (!cur) return -1;
if (!cur->node) return -1;
return eina_ustrbuf_length_get(cur->node->unicode);
len = eina_ustrbuf_length_get(cur->node->unicode);
if (EINA_INLIST_GET(cur->node)->next)
return len - 1; /* Remove the paragraph separator */
else
return len;
}
EAPI const Evas_Object_Textblock_Node_Format *