From 435aa04486a7298e6d537292c761e5704daf9766 Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 13 May 2001 16:13:39 +0000 Subject: [PATCH] Fix the sense of posdiff(), causing the extend-selection mouse action to work correctly again. git-svn-id: svn://svn.tartarus.org/sgt/putty@1125 cda61777-01e9-0310-a592-d414129be87e --- terminal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminal.c b/terminal.c index 119ecaa9..2ddd1a74 100644 --- a/terminal.c +++ b/terminal.c @@ -82,7 +82,7 @@ typedef struct { #define poslt(p1,p2) ( (p1).y < (p2).y || ( (p1).y == (p2).y && (p1).x < (p2).x ) ) #define posle(p1,p2) ( (p1).y < (p2).y || ( (p1).y == (p2).y && (p1).x <= (p2).x ) ) #define poseq(p1,p2) ( (p1).y == (p2).y && (p1).x == (p2).x ) -#define posdiff(p1,p2) ( ((p2).y - (p1).y) * (cols+1) + (p2).x - (p1).x ) +#define posdiff(p1,p2) ( ((p1).y - (p2).y) * (cols+1) + (p1).x - (p2).x ) #define incpos(p) ( (p).x == cols ? ((p).x = 0, (p).y++, 1) : ((p).x++, 0) ) #define decpos(p) ( (p).x == 0 ? ((p).x = cols, (p).y--, 1) : ((p).x--, 0) ) -- 2.11.0