Improve drag select (dragging outside LHS doesn't now select first
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 22 Jan 1999 09:36:21 +0000 (09:36 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 22 Jan 1999 09:36:21 +0000 (09:36 +0000)
char too)

git-svn-id: svn://svn.tartarus.org/sgt/putty@20 cda61777-01e9-0310-a592-d414129be87e

terminal.c

index b41eacd..2c41145 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;