changeset 2133:5514b7262ba1

selection press button 3, don't bother going through most of the link stuff It just had the effect of getting it confused sometimes -- pop up the link menu, and then click elsewhere, and it would select the text between A and B.
author corvid <corvid@lavabit.com>
date Sun, 17 Jul 2011 21:14:30 +0000
parents f299fd73f61f
children 498945d6d780
files dw/selection.cc
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/dw/selection.cc	Sun Jul 17 20:52:09 2011 +0000
+++ b/dw/selection.cc	Sun Jul 17 21:14:30 2011 +0000
@@ -94,7 +94,11 @@
 
    if (!event) return ret;
 
-   if (linkNo != -1) {
+   if (event->button == 3) {
+      // menu popup
+      layout->emitLinkPress (itWidget, linkNo, -1, -1, -1, event);
+      ret = true;
+   } else if (linkNo != -1) {
       // link handling
       (void) layout->emitLinkPress (itWidget, linkNo, -1, -1, -1, event);
       resetLink ();
@@ -134,10 +138,6 @@
          toChar = correctCharPos (to, charPos);
       }
       ret = true;
-   } else if (event->button == 3) {
-      // menu popup
-      layout->emitLinkPress (itWidget, -1, -1, -1, -1, event);
-      ret = true;
    }
 
    return ret;