From: Enlightenment S. <no-...@en...> - 2010-08-19 14:07:56
|
Log: Evas textblock: Fixed range_text_get, no works when selecting text from multiple paragraphs. Author: tasn Date: 2010-08-19 07:07:45 -0700 (Thu, 19 Aug 2010) New Revision: 51392 Modified: trunk/evas/src/lib/canvas/evas_object_textblock.c Modified: trunk/evas/src/lib/canvas/evas_object_textblock.c =================================================================== --- trunk/evas/src/lib/canvas/evas_object_textblock.c 2010-08-19 13:52:36 UTC (rev 51391) +++ trunk/evas/src/lib/canvas/evas_object_textblock.c 2010-08-19 14:07:45 UTC (rev 51392) @@ -6037,25 +6037,30 @@ eina_unicode_strdup(eina_ustrbuf_string_get(tnode->unicode)); if (tnode == cur2->node) { - fnode = _evas_textblock_node_text_get_first_format_between(n1, + fnode = _evas_textblock_node_text_get_first_format_between(tnode, cur1->pos, cur2->pos); } - else + else if (tnode == cur1->node) { - fnode = _evas_textblock_node_text_get_first_format_between(n1, + fnode = _evas_textblock_node_text_get_first_format_between(tnode, cur1->pos, -1); } + else + { + fnode = _evas_textblock_node_text_get_first_format_between(tnode, + 0, -1); + } /* Init the offset so the first one will count starting from cur1->pos * and not the previous format node */ if ((tnode == cur1->node) && fnode) { off = _evas_textblock_node_format_pos_get(fnode) - cur1->pos - fnode->offset; + text += cur1->pos; } else { off = 0; } - text += cur1->pos; while (fnode && (fnode->text_node == tnode)) { Eina_Unicode tmp_ch; |