From: simon Date: Fri, 22 Jan 1999 09:36:21 +0000 (+0000) Subject: Improve drag select (dragging outside LHS doesn't now select first X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/094ed2a65755b01fb3d8a29167033f551be962ef Improve drag select (dragging outside LHS doesn't now select first char too) git-svn-id: svn://svn.tartarus.org/sgt/putty@20 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/terminal.c b/terminal.c index b41eacda..2c411453 100644 --- a/terminal.c +++ b/terminal.c @@ -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;