summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2010-08-16 08:52:18 +0000
committerTom Hacohen <tom@stosb.com>2010-08-16 08:52:18 +0000
commit9ed2feb59edb7386d074381a6dd5eaabf7cf0ed6 (patch)
tree4f74088159bfbc7d5eca33a2263785368d4868e5 /legacy
parent1a40634b0e0fa56a8bb70c7c4fae954cb00e71cd (diff)
Evas textblock: Fixed a bug with getting text in range.
SVN revision: 51170
Diffstat (limited to 'legacy')
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_textblock.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c
index 3ef19f16d0..e7cfbd9c98 100644
--- a/legacy/evas/src/lib/canvas/evas_object_textblock.c
+++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c
@@ -5075,7 +5075,7 @@ _evas_textblock_node_text_get_first_format_between(Evas_Object_Textblock *o,
5075 Evas_Object_Textblock_Node_Format *itr; 5075 Evas_Object_Textblock_Node_Format *itr;
5076 int use_end = 1; 5076 int use_end = 1;
5077 itr = n->format_node; 5077 itr = n->format_node;
5078 if (end < 0) end = 0; 5078 if (end < 0) use_end = 0;
5079 while (itr && (itr->text_node == n)) 5079 while (itr && (itr->text_node == n))
5080 { 5080 {
5081 start -= itr->offset; 5081 start -= itr->offset;
@@ -5981,7 +5981,16 @@ evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Ev
5981 5981
5982 text_base = text = 5982 text_base = text =
5983 eina_unicode_strdup(eina_ustrbuf_string_get(n1->unicode)); 5983 eina_unicode_strdup(eina_ustrbuf_string_get(n1->unicode));
5984 fnode = _evas_textblock_node_text_get_first_format_between(o, n1, cur1->pos, cur2->pos); 5984 if (tnode == cur2->node)
5985 {
5986 fnode = _evas_textblock_node_text_get_first_format_between(o, n1,
5987 cur1->pos, cur2->pos);
5988 }
5989 else
5990 {
5991 fnode = _evas_textblock_node_text_get_first_format_between(o, n1,
5992 cur1->pos, -1);
5993 }
5985 /* Init the offset so the first one will count starting from cur1->pos 5994 /* Init the offset so the first one will count starting from cur1->pos
5986 * and not the previous format node */ 5995 * and not the previous format node */
5987 if ((tnode == cur1->node) && fnode) 5996 if ((tnode == cur1->node) && fnode)