From 9fa4ee1d54ef8ece4fcd39d89d17797ba49c1a53 Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Tue, 28 Jan 2014 22:32:05 +0100 Subject: [PATCH] fix selection with shift to avoid mouse mode. Closes T863 --- src/bin/termio.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/bin/termio.c b/src/bin/termio.c index 48efb3fa..93918e8a 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -3144,22 +3144,19 @@ _smart_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUS sd->pty->selection.end.y = cy - sd->scroll; _selection_dbl_fix(data); } - else + else if (!(shift && sd->pty->selection.is_active)) { sd->moved = EINA_FALSE; _sel_set(data, EINA_FALSE); - if (!shift) - { - sd->pty->selection.is_box = - (ctrl || - evas_key_modifier_is_set(ev->modifiers, "Alt")); - sd->pty->selection.start.x = cx; - sd->pty->selection.start.y = cy - sd->scroll; - sd->pty->selection.end.x = cx; - sd->pty->selection.end.y = cy - sd->scroll; - sd->pty->selection.makesel = EINA_TRUE; - _selection_dbl_fix(data); - } + sd->pty->selection.is_box = + (ctrl || + evas_key_modifier_is_set(ev->modifiers, "Alt")); + sd->pty->selection.start.x = cx; + sd->pty->selection.start.y = cy - sd->scroll; + sd->pty->selection.end.x = cx; + sd->pty->selection.end.y = cy - sd->scroll; + sd->pty->selection.makesel = EINA_TRUE; + _selection_dbl_fix(data); } } _smart_update_queue(data, sd);