]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - terminal.c
Improve drag select (dragging outside LHS doesn't now select first
[PuTTY.git] / terminal.c
index b41eacda59a5c9bc21dc6666487f31505f3886b7..2c411453e4292a8a4fa9dce213425ccab03c313e 100644 (file)
@@ -1345,7 +1345,13 @@ void term_mouse (Mouse_Button b, Mouse_Action a, int x, int y) {
     
     if (y<0) y = 0;
     if (y>=rows) y = rows-1;
-    if (x<0) x = 0;
+    if (x<0) {
+        if (y > 0) {
+            x = cols-1;
+            y--;
+        } else
+            x = 0;
+    }
     if (x>=cols) x = cols-1;
 
     selpoint = disptop + y * (cols+1) + x;