From 44658ac99422bbd4b6adf7d42ba70a711bb1eceb Mon Sep 17 00:00:00 2001 From: tasn Date: Mon, 5 Sep 2011 12:03:53 +0000 Subject: [PATCH] Evas textblock: Use viewport for getting visible range, not clip. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@63191 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_textblock.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index 7b2ee36..96ba09b 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -7965,12 +7965,13 @@ evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C EAPI Eina_Bool evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end) { + Evas *e; Evas_Coord cy, ch; Evas_Object *obj = start->obj; TB_HEAD_RETURN(EINA_FALSE); - /* Clip is relative to the object */ - cy = obj->cur.cache.clip.y - obj->cur.geometry.y; - ch = obj->cur.cache.clip.h; + e = evas_object_evas_get(obj); + cy = 0 - obj->cur.geometry.y; + ch = e->viewport.h; evas_textblock_cursor_line_coord_set(start, cy); evas_textblock_cursor_line_coord_set(end, cy + ch); evas_textblock_cursor_line_char_last(end); -- 2.7.4