summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_object_textblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_object_textblock.c')
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index da4840e2ca..85b529f487 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -11772,6 +11772,14 @@ _evas_textblock_cursor_range_in_line_geometry_get(
return NULL;
}
+#ifdef BIDI_SUPPORT
+ if (ti->text_props.bidi_dir == EVAS_BIDI_DIRECTION_RTL)
+ {
+ x1 = x1 + w1;
+ x2 = x2 + w2;
+ }
+#endif
+
/* Make x2 the one on the right */
if (x2 < x1)
{
@@ -11785,18 +11793,9 @@ _evas_textblock_cursor_range_in_line_geometry_get(
w2 = tmp;
}
-#ifdef BIDI_SUPPORT
- if (ti->text_props.bidi_dir == EVAS_BIDI_DIRECTION_RTL)
- {
- x = x1 + w1;
- w = x2 + w2 - x;
- }
- else
-#endif
- {
- x = x1;
- w = x2 - x1;
- }
+ x = x1;
+ w = x2 - x1;
+
if (w > 0)
{
tr = calloc(1, sizeof(Evas_Textblock_Rectangle));