summaryrefslogtreecommitdiff
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:28:30 +0000
commitbaede38db9f46db26230bfd3951567db3bf53359 (patch)
tree7e787cea2212b23f1016eb7283bc82862a485892
parent84e644f9e5c0a429583cb7b24b8ecad299a625a6 (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.
-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 0830a09754..b7c4d448d5 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -10109,7 +10109,8 @@ _evas_textblock_cursor_range_in_line_geometry_get(
10109 10109
10110 while (it && (it != it2)) 10110 while (it && (it != it2))
10111 { 10111 {
10112 if ((it1->text_pos <= it->text_pos) && (it->text_pos <= it2->text_pos)) 10112 if (((it1->text_pos <= it->text_pos) && (it->text_pos <= it2->text_pos)) ||
10113 ((it2->text_pos <= it->text_pos) && (it->text_pos <= it1->text_pos)))
10113 { 10114 {
10114 max_x = it->x + it->adv; 10115 max_x = it->x + it->adv;
10115 } 10116 }