From: raster Date: Wed, 30 Mar 2011 12:20:51 +0000 (+0000) Subject: selection now works too. X-Git-Tag: submit/2.0alpha-wayland/20121127.221958~830 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db7febb52ee724d26c7e0049654dba90799ae1a5;p=profile%2Fivi%2Fedje.git selection now works too. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@58209 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/edje_entry.c b/src/lib/edje_entry.c index e29538f..f1424a5 100644 --- a/src/lib/edje_entry.c +++ b/src/lib/edje_entry.c @@ -1697,12 +1697,26 @@ _edje_part_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS { Evas_Coord lx, ly, lw, lh; - evas_textblock_cursor_line_coord_set(en->cursor, en->cy); - evas_textblock_cursor_line_geometry_get(en->cursor, &lx, &ly, &lw, &lh); - if (en->cx <= lx) - _curs_lin_start(en->cursor, rp->object, en); + if (evas_textblock_cursor_line_coord_set(en->cursor, en->cy) < 0) + { + if (rp->part->multiline) + _curs_end(en->cursor, rp->object, en); + else + { + evas_textblock_cursor_paragraph_first(en->cursor); + evas_textblock_cursor_line_geometry_get(en->cursor, &lx, &ly, &lw, &lh); + if (!evas_textblock_cursor_char_coord_set(en->cursor, en->cx, ly + (lh / 2))) + _curs_end(en->cursor, rp->object, en); + } + } else - _curs_lin_end(en->cursor, rp->object, en); + { + evas_textblock_cursor_line_geometry_get(en->cursor, &lx, &ly, &lw, &lh); + if (en->cx <= lx) + _curs_lin_start(en->cursor, rp->object, en); + else + _curs_lin_end(en->cursor, rp->object, en); + } } if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT) {