Evas_Coord lx, ly, lw, lh;
int last = _curs_line_last_get(c, o, en);
- if (ln < 0) ln = 0;
- else
- {
- if (ln > last) ln = last;
- }
+ if (ln < 0) return EINA_FALSE;
+ if (ln > last) return EINA_FALSE;
_curs_update_from_curs(c, o, en, &cx, &cy);
if (!evas_object_textblock_line_number_geometry_get(o, ln, &lx, &ly, &lw, &lh))
return EINA_FALSE;
if (evas_textblock_cursor_char_coord_set(c, cx, ly + (lh / 2)))
- return EINA_FALSE;
+ return EINA_TRUE;
evas_textblock_cursor_line_set(c, ln);
if (cx < (lx + (lw / 2)))
{
_compose_seq_reset(en);
if (multiline)
{
+ if (en->have_selection &&
+ (evas_textblock_cursor_pos_get(en->sel_start) != evas_textblock_cursor_pos_get(en->sel_end)))
+ ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (en->select_allow)
{
- if (shift) _sel_start(en->cursor, rp->object, en);
+ if (shift)
+ {
+ _sel_start(en->cursor, rp->object, en);
+ ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
+ }
else _sel_clear(ed, en->cursor, rp->object, en);
}
if (_curs_up(en->cursor, rp->object, en))
_compose_seq_reset(en);
if (multiline)
{
+ if (en->have_selection &&
+ (evas_textblock_cursor_pos_get(en->sel_start) != evas_textblock_cursor_pos_get(en->sel_end)))
+ ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (en->select_allow)
{
- if (shift) _sel_start(en->cursor, rp->object, en);
+ if (shift)
+ {
+ _sel_start(en->cursor, rp->object, en);
+ ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
+ }
else _sel_clear(ed, en->cursor, rp->object, en);
}
if (_curs_down(en->cursor, rp->object, en))
(!strcmp(ev->keyname, "KP_Left") && !ev->string))
{
_compose_seq_reset(en);
+ if (en->have_selection &&
+ (evas_textblock_cursor_pos_get(en->sel_start) != evas_textblock_cursor_pos_get(en->sel_end)))
+ ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (en->select_allow)
{
- if (shift) _sel_start(en->cursor, rp->object, en);
+ if (shift)
+ {
+ _sel_start(en->cursor, rp->object, en);
+ ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
+ }
else _sel_clear(ed, en->cursor, rp->object, en);
}
if (evas_textblock_cursor_char_prev(en->cursor))
(!strcmp(ev->keyname, "KP_Right") && !ev->string))
{
_compose_seq_reset(en);
+ if (en->have_selection &&
+ (evas_textblock_cursor_pos_get(en->sel_start) != evas_textblock_cursor_pos_get(en->sel_end)))
+ ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (en->select_allow)
{
- if (shift) _sel_start(en->cursor, rp->object, en);
+ if (shift)
+ {
+ _sel_start(en->cursor, rp->object, en);
+ ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
+ }
else _sel_clear(ed, en->cursor, rp->object, en);
}
/* If control is pressed, go to the end of the word */