From 3b4091a80d83dc862ab2af68ccb461431d833b0a Mon Sep 17 00:00:00 2001 From: tasn Date: Wed, 11 Aug 2010 08:33:22 +0000 Subject: [PATCH] Evas: fix range text get in textblock. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@50988 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_textblock.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index 718bf41..b67d5bb 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -1152,7 +1152,7 @@ _format_clean_param(char *dst, const char *src) * * @param obj the evas object - should not be NULL. * @param fmt The format to populate - should not be NULL. - * @param[in] cmd the command to proccess + * @param[in] cmd the command to proccess, should be stringshared. * @param[in] param the parameter of the command. */ static void @@ -5887,7 +5887,7 @@ evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Ev if (n1 == n2) { text = eina_ustrbuf_string_get(n1->unicode); - eina_ustrbuf_append_length(buf, text, cur2->pos - cur1->pos); + eina_ustrbuf_append_length(buf, text + cur1->pos, cur2->pos - cur1->pos); } else { @@ -5903,11 +5903,10 @@ evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Ev len = eina_ustrbuf_length_get(n1->unicode); text = eina_ustrbuf_string_get(n1->unicode); - eina_ustrbuf_append_length(buf, text, len - cur1->pos); + eina_ustrbuf_append_length(buf, text + cur1->pos, len - cur1->pos); - len = eina_ustrbuf_length_get(n2->unicode); text = eina_ustrbuf_string_get(n2->unicode); - eina_ustrbuf_append_length(buf, text + cur2->pos, len - cur2->pos); + eina_ustrbuf_append_length(buf, text, cur2->pos); } /* return the string */ -- 2.7.4