summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2013-08-29 14:00:29 +0200
committerBoris Faure <billiob@gmail.com>2013-08-29 14:00:29 +0200
commit2c5828f5e2e5e1d2b69cfe2eeaf270d70efbb7ae (patch)
tree164d2fd65fa2deebb1fbccfea8c8ad03c4bcfb2f
parent58bcae42d42eb597e558015f40bb2657a3968b66 (diff)
fix extending selection with shift + double click. Closes T228
-rw-r--r--src/bin/termio.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 5e43f05..c3cc9e1 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -2966,21 +2966,22 @@ _smart_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUS
2966 } 2966 }
2967 else 2967 else
2968 { 2968 {
2969 if (evas_key_modifier_is_set(ev->modifiers, "Shift") || 2969 /* SINGLE CLICK */
2970 evas_key_modifier_is_set(ev->modifiers, "Control") || 2970 if (evas_key_modifier_is_set(ev->modifiers, "Shift") ||
2971 evas_key_modifier_is_set(ev->modifiers, "Alt")) 2971 evas_key_modifier_is_set(ev->modifiers, "Control") ||
2972 { 2972 evas_key_modifier_is_set(ev->modifiers, "Alt"))
2973 sd->cur.sel1.x = cx; 2973 {
2974 sd->cur.sel1.y = cy - sd->scroll; 2974 sd->cur.sel1.x = cx;
2975 sd->cur.sel2.x = cx; 2975 sd->cur.sel1.y = cy - sd->scroll;
2976 sd->cur.sel2.y = cy - sd->scroll; 2976 sd->cur.sel2.x = cx;
2977 sd->cur.sel = EINA_TRUE; 2977 sd->cur.sel2.y = cy - sd->scroll;
2978 sd->cur.makesel = EINA_TRUE; 2978 sd->cur.sel = EINA_TRUE;
2979 sd->boxsel = EINA_TRUE; 2979 sd->cur.makesel = EINA_TRUE;
2980 sd->boxsel = EINA_TRUE;
2980#if defined(SUPPORT_DBLWIDTH) 2981#if defined(SUPPORT_DBLWIDTH)
2981 _selection_dbl_fix(data); 2982 _selection_dbl_fix(data);
2982#endif 2983#endif
2983 } 2984 }
2984 if (sd->top_left || sd->bottom_right) 2985 if (sd->top_left || sd->bottom_right)
2985 { 2986 {
2986 sd->cur.makesel = 1; 2987 sd->cur.makesel = 1;
@@ -3001,11 +3002,6 @@ _smart_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUS
3001 } 3002 }
3002 else 3003 else
3003 { 3004 {
3004 sd->backup.sel = sd->cur.sel;
3005 sd->backup.sel1.x = sd->cur.sel1.x;
3006 sd->backup.sel1.y = sd->cur.sel1.y;
3007 sd->backup.sel2.x = sd->cur.sel2.x;
3008 sd->backup.sel2.y = sd->cur.sel2.y;
3009 if (sd->cur.sel) 3005 if (sd->cur.sel)
3010 { 3006 {
3011 sd->cur.sel = 0; 3007 sd->cur.sel = 0;
@@ -3078,6 +3074,11 @@ _smart_cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED
3078 _smart_update_queue(data, sd); 3074 _smart_update_queue(data, sd);
3079 _take_selection(data, ELM_SEL_TYPE_PRIMARY); 3075 _take_selection(data, ELM_SEL_TYPE_PRIMARY);
3080 } 3076 }
3077 sd->backup.sel = sd->cur.sel;
3078 sd->backup.sel1.x = sd->cur.sel1.x;
3079 sd->backup.sel1.y = sd->cur.sel1.y;
3080 sd->backup.sel2.x = sd->cur.sel2.x;
3081 sd->backup.sel2.y = sd->cur.sel2.y;
3081 } 3082 }
3082 } 3083 }
3083} 3084}