Evas: fix range text get in textblock.

SVN revision: 50988
This commit is contained in:
Tom Hacohen 2010-08-11 08:33:22 +00:00
parent c3759fb4a2
commit 62b8c6e43d
1 changed files with 4 additions and 5 deletions

View File

@ -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 */