From 29cce22a908bbee11f1f5f538c588f124be96be8 Mon Sep 17 00:00:00 2001 From: Simon Tatham 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. [originally from svn r1125] --- 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) )