forked from enlightenment/terminology
do not bring back a selection from the dead
This commit is contained in:
parent
e5efdabd27
commit
b149052d64
|
@ -40,12 +40,6 @@ struct _Termio
|
||||||
int cx, cy;
|
int cx, cy;
|
||||||
int button;
|
int button;
|
||||||
} mouse;
|
} mouse;
|
||||||
struct {
|
|
||||||
struct {
|
|
||||||
int x, y;
|
|
||||||
} start, end;
|
|
||||||
Eina_Bool available : 1;
|
|
||||||
} backup_sel;
|
|
||||||
struct {
|
struct {
|
||||||
char *string;
|
char *string;
|
||||||
int x1, y1, x2, y2;
|
int x1, y1, x2, y2;
|
||||||
|
@ -3043,22 +3037,10 @@ _smart_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUS
|
||||||
}
|
}
|
||||||
else if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
|
else if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
|
||||||
{
|
{
|
||||||
if (shift &&
|
if (shift)
|
||||||
sd->backup_sel.available)
|
|
||||||
{
|
|
||||||
_sel_set(data, EINA_TRUE);
|
|
||||||
sd->pty->selection.is_active = EINA_TRUE;
|
|
||||||
sd->pty->selection.start.x = sd->backup_sel.start.x;
|
|
||||||
sd->pty->selection.start.y = sd->backup_sel.start.y;
|
|
||||||
sd->pty->selection.end.x = sd->backup_sel.end.x;
|
|
||||||
sd->pty->selection.end.y = sd->backup_sel.end.y;
|
|
||||||
_selection_dbl_fix(data);
|
|
||||||
_sel_word_to(data, cx, cy - sd->scroll);
|
_sel_word_to(data, cx, cy - sd->scroll);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_sel_word(data, cx, cy - sd->scroll);
|
_sel_word(data, cx, cy - sd->scroll);
|
||||||
}
|
|
||||||
if (sd->pty->selection.is_active)
|
if (sd->pty->selection.is_active)
|
||||||
_take_selection(data, ELM_SEL_TYPE_PRIMARY);
|
_take_selection(data, ELM_SEL_TYPE_PRIMARY);
|
||||||
sd->didclick = EINA_TRUE;
|
sd->didclick = EINA_TRUE;
|
||||||
|
@ -3213,11 +3195,6 @@ _smart_cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED
|
||||||
_smart_update_queue(data, sd);
|
_smart_update_queue(data, sd);
|
||||||
_take_selection(data, ELM_SEL_TYPE_PRIMARY);
|
_take_selection(data, ELM_SEL_TYPE_PRIMARY);
|
||||||
}
|
}
|
||||||
sd->backup_sel.available = sd->pty->selection.is_active;
|
|
||||||
sd->backup_sel.start.x = sd->pty->selection.start.x;
|
|
||||||
sd->backup_sel.start.y = sd->pty->selection.start.y;
|
|
||||||
sd->backup_sel.end.x = sd->pty->selection.end.x;
|
|
||||||
sd->backup_sel.end.y = sd->pty->selection.end.y;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue