summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2014-01-29 13:25:21 +0000
committerTom Hacohen <tom@stosb.com>2014-01-29 13:27:45 +0000
commit22813f5b5218a02273fefca3f61fde970ce47d75 (patch)
tree81ce9b5238725d0e845894a67184e59e061e300a /src
parenta5691571e3ff1de88cf0beccd86fbf7ca24535b8 (diff)
Evas textblock: Fix selection with bidi text.
This is a regression introduced in 548e548632333f5ef533079a7aaa54aadd20ef8d. 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.
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 30ebdb46f1..4ea0e26f1d 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -10136,7 +10136,8 @@ _evas_textblock_cursor_range_in_line_geometry_get(
10136 10136
10137 while (it && (it != it2)) 10137 while (it && (it != it2))
10138 { 10138 {
10139 if ((it1->text_pos <= it->text_pos) && (it->text_pos <= it2->text_pos)) 10139 if (((it1->text_pos <= it->text_pos) && (it->text_pos <= it2->text_pos)) ||
10140 ((it2->text_pos <= it->text_pos) && (it->text_pos <= it1->text_pos)))
10140 { 10141 {
10141 max_x = it->x + it->adv; 10142 max_x = it->x + it->adv;
10142 } 10143 }