From 0fc1c0c9c9558139d7b582d93bbfc2f87671b44f Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 22 Jan 1999 09:36:21 +0000 Subject: [PATCH] Improve drag select (dragging outside LHS doesn't now select first char too) [originally from svn r20] --- terminal.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; -- 2.45.2