billiob pushed a commit to branch master.

commit 2c5828f5e2e5e1d2b69cfe2eeaf270d70efbb7ae
Author: Boris Faure <[email protected]>
Date:   Thu Aug 29 14:00:29 2013 +0200

    fix extending selection with shift + double click. Closes T228
---
 src/bin/termio.c | 37 +++++++++++++++++++------------------
 1 file 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
           }
         else
           {
-            if (evas_key_modifier_is_set(ev->modifiers, "Shift") ||
-                evas_key_modifier_is_set(ev->modifiers, "Control") ||
-                evas_key_modifier_is_set(ev->modifiers, "Alt"))
-              {
-                 sd->cur.sel1.x = cx;
-                 sd->cur.sel1.y = cy - sd->scroll;
-                 sd->cur.sel2.x = cx;
-                 sd->cur.sel2.y = cy - sd->scroll;
-                 sd->cur.sel = EINA_TRUE;
-                 sd->cur.makesel = EINA_TRUE;
-                 sd->boxsel = EINA_TRUE;
+             /* SINGLE CLICK */
+             if (evas_key_modifier_is_set(ev->modifiers, "Shift") ||
+                 evas_key_modifier_is_set(ev->modifiers, "Control") ||
+                 evas_key_modifier_is_set(ev->modifiers, "Alt"))
+               {
+                  sd->cur.sel1.x = cx;
+                  sd->cur.sel1.y = cy - sd->scroll;
+                  sd->cur.sel2.x = cx;
+                  sd->cur.sel2.y = cy - sd->scroll;
+                  sd->cur.sel = EINA_TRUE;
+                  sd->cur.makesel = EINA_TRUE;
+                  sd->boxsel = EINA_TRUE;
 #if defined(SUPPORT_DBLWIDTH)
-                 _selection_dbl_fix(data);
+                  _selection_dbl_fix(data);
 #endif
-              }
+               }
              if (sd->top_left || sd->bottom_right)
                {
                   sd->cur.makesel = 1;
@@ -3001,11 +3002,6 @@ _smart_cb_mouse_down(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNUS
                }
              else
                {
-                  sd->backup.sel = sd->cur.sel;
-                  sd->backup.sel1.x = sd->cur.sel1.x;
-                  sd->backup.sel1.y = sd->cur.sel1.y;
-                  sd->backup.sel2.x = sd->cur.sel2.x;
-                  sd->backup.sel2.y = sd->cur.sel2.y;
                   if (sd->cur.sel)
                     {
                        sd->cur.sel = 0;
@@ -3078,6 +3074,11 @@ _smart_cb_mouse_up(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED
                  _smart_update_queue(data, sd);
                  _take_selection(data, ELM_SEL_TYPE_PRIMARY);
               }
+            sd->backup.sel = sd->cur.sel;
+            sd->backup.sel1.x = sd->cur.sel1.x;
+            sd->backup.sel1.y = sd->cur.sel1.y;
+            sd->backup.sel2.x = sd->cur.sel2.x;
+            sd->backup.sel2.y = sd->cur.sel2.y;
           }
      }
 }

-- 

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk

Reply via email to