Fix the sense of posdiff(), causing the extend-selection mouse

action to work correctly again.

[originally from svn r1125]
This commit is contained in:
Simon Tatham 2001-05-13 16:13:39 +00:00
Родитель d05e9f0b1a
Коммит 29cce22a90
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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) )