Evas textblock: Fixed evas_textblock_range_text_get that didn't work on textblocks with no formats at all (not even newlines or tabs).

SVN revision: 52339
This commit is contained in:
Tom Hacohen 2010-09-16 07:12:23 +00:00
parent 08055d63b9
commit 9fb94f209b
1 changed files with 6 additions and 3 deletions

View File

@ -6170,10 +6170,13 @@ evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Ev
}
/* Init the offset so the first one will count starting from cur1->pos
* and not the previous format node */
if ((tnode == cur1->node) && fnode)
if (tnode == cur1->node)
{
off = _evas_textblock_node_format_pos_get(fnode) -
cur1->pos - fnode->offset;
if (fnode)
{
off = _evas_textblock_node_format_pos_get(fnode) -
cur1->pos - fnode->offset;
}
text += cur1->pos;
}
else