Evas textblock: Fix selection with bidi text.

This is a regression introduced in
548e548632.

This is really bad, and essentially broke selection geometry for bidi
text. Very serious.

The problematic code assumed that the range comparison for the items
assumed the item marked with 1 is always logically before the item marked
with 2, which is just not true.
This commit is contained in:
Tom Hacohen 2014-01-29 13:25:21 +00:00
parent a5691571e3
commit 22813f5b52
1 changed files with 2 additions and 1 deletions

View File

@ -10136,7 +10136,8 @@ _evas_textblock_cursor_range_in_line_geometry_get(
while (it && (it != it2))
{
if ((it1->text_pos <= it->text_pos) && (it->text_pos <= it2->text_pos))
if (((it1->text_pos <= it->text_pos) && (it->text_pos <= it2->text_pos)) ||
((it2->text_pos <= it->text_pos) && (it->text_pos <= it1->text_pos)))
{
max_x = it->x + it->adv;
}