SVN revision: 16521
This commit is contained in:
Carsten Haitzler 2005-09-04 11:34:03 +00:00
parent 7068ed1fc0
commit 904063a099
1 changed files with 13 additions and 2 deletions

View File

@ -3163,7 +3163,7 @@ evas_textblock2_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x,
Evas_Object_Textblock *o;
Evas_Object_List *l, *ll;
Evas_Object_Textblock_Line *ln = NULL;
Evas_Object_Textblock_Item *it = NULL;
Evas_Object_Textblock_Item *it = NULL, *it_break = NULL;
Evas_Object_Textblock_Format_Item *fi = NULL;
if (!cur) return 0;
@ -3180,7 +3180,11 @@ evas_textblock2_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x,
for (ll = (Evas_Object_List *)ln->items; ll; ll = ll->next)
{
it = (Evas_Object_Textblock_Item *)ll;
if ((it->x +ln->x) > x) break;
if ((it->x +ln->x) > x)
{
it_break = it;
break;
}
if (((it->x + ln->x) <= x) && (((it->x + ln->x) + it->w) > x))
{
int pos;
@ -3209,6 +3213,13 @@ evas_textblock2_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x,
return 1;
}
}
if (it_break)
{
it = it_break;
cur->pos = it->source_pos;
cur->node = it->source_node;
return 1;
}
}
}
return 0;