Fix the sense of posdiff(), causing the extend-selection mouse
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 13 May 2001 16:13:39 +0000 (16:13 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 13 May 2001 16:13:39 +0000 (16:13 +0000)
action to work correctly again.

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

terminal.c

index 119ecaa..2ddd1a7 100644 (file)
@@ -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) )