Evas textblock: Fixed a bug in cursor_char_coord_set with coords < 0.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 13 Jul 2011 14:35:12 +0000 (14:35 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 13 Jul 2011 14:35:12 +0000 (14:35 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@61341 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c

index 805ec9f..790b354 100644 (file)
@@ -7690,9 +7690,14 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
         /* If we are after the last paragraph, use the last position in the
          * text. */
         evas_textblock_cursor_paragraph_last(cur);
-        evas_textblock_cursor_char_next(cur);
         return EINA_TRUE;
      }
+   else if (y < 0)
+     {
+        evas_textblock_cursor_paragraph_first(cur);
+        return EINA_TRUE;
+     }
+
    return EINA_FALSE;
 }