forked from enlightenment/efl
Evas textblock: Fixed *_cursor_char_coord_set with some y values.
Specifically y values that are between par->y and the first ln->y. This should fix some selection issues with elm.
This commit is contained in:
parent
97f625c021
commit
354691e03e
|
@ -9743,17 +9743,22 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (o->paragraphs && (y >= o->paragraphs->y + o->formatted.h))
|
||||
|
||||
if (o->paragraphs)
|
||||
{
|
||||
/* If we are after the last paragraph, use the last position in the
|
||||
* text. */
|
||||
evas_textblock_cursor_paragraph_last(cur);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
else if (o->paragraphs && (y < o->paragraphs->y))
|
||||
{
|
||||
evas_textblock_cursor_paragraph_first(cur);
|
||||
return EINA_TRUE;
|
||||
Evas_Object_Textblock_Line *first_line = o->paragraphs->lines;
|
||||
if (y >= o->paragraphs->y + o->formatted.h)
|
||||
{
|
||||
/* If we are after the last paragraph, use the last position in the
|
||||
* text. */
|
||||
evas_textblock_cursor_paragraph_last(cur);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
else if (o->paragraphs && (y < (o->paragraphs->y + first_line->y)))
|
||||
{
|
||||
evas_textblock_cursor_paragraph_first(cur);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return EINA_FALSE;
|
||||
|
|
Loading…
Reference in New Issue