git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@61206
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
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 *