Evas textblock: Fixed issue with char/line_coord_set with valign.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 14 Jul 2011 07:36:45 +0000 (07:36 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 14 Jul 2011 07:36:45 +0000 (07:36 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@61360 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c

index afa01ee..d7d3dc3 100644 (file)
@@ -7692,7 +7692,7 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
         evas_textblock_cursor_paragraph_last(cur);
         return EINA_TRUE;
      }
-   else if (y < 0)
+   else if ((y < 0) || (o->paragraphs && (y < o->paragraphs->y)))
      {
         evas_textblock_cursor_paragraph_first(cur);
         return EINA_TRUE;
@@ -7746,7 +7746,7 @@ evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y)
           }
         return line_no;
      }
-   else if (y < 0)
+   else if ((y < 0) || (o->paragraphs && (y < o->paragraphs->y)))
      {
         int line_no = 0;
         evas_textblock_cursor_paragraph_first(cur);