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.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index b7c4d448d5..3ea0d08641 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -9773,17 +9773,22 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
9773 } 9773 }
9774 } 9774 }
9775 } 9775 }
9776 else if (o->paragraphs && (y >= o->paragraphs->y + o->formatted.h)) 9776
9777 { 9777 if (o->paragraphs)
9778 /* If we are after the last paragraph, use the last position in the
9779 * text. */
9780 evas_textblock_cursor_paragraph_last(cur);
9781 return EINA_TRUE;
9782 }
9783 else if (o->paragraphs && (y < o->paragraphs->y))
9784 { 9778 {
9785 evas_textblock_cursor_paragraph_first(cur); 9779 Evas_Object_Textblock_Line *first_line = o->paragraphs->lines;
9786 return EINA_TRUE; 9780 if (y >= o->paragraphs->y + o->formatted.h)
9781 {
9782 /* If we are after the last paragraph, use the last position in the
9783 * text. */
9784 evas_textblock_cursor_paragraph_last(cur);
9785 return EINA_TRUE;
9786 }
9787 else if (o->paragraphs && (y < (o->paragraphs->y + first_line->y)))
9788 {
9789 evas_textblock_cursor_paragraph_first(cur);
9790 return EINA_TRUE;
9791 }
9787 } 9792 }
9788 9793
9789 return EINA_FALSE; 9794 return EINA_FALSE;