Currently a negative co-ordinate means "use the ->cx/cy value of the target
pane". This allows changing position in one dimension only.
However it prevents receiving a negative co-ordinate, which might happen
in the mount event happens out-side the pane which has grabbed the
mouse.
So instead of a negative number, use MAX_INT to say "don't change".
Signed-off-by: NeilBrown <neil@brown.name>
struct mark *m2 = mark_dup(m);
call("Move-CursorXY", ci->focus, 0, m, NULL,
0, NULL, NULL,
- -1, repoint < 0 ? ci->focus->h-1 : 0);
+ INT_MAX, repoint < 0 ? ci->focus->h-1 : 0);
if (repoint < 0)
/* can only move point backwards */
if (m->seq < m2->seq)
int xypos;
cih = pane_mapxy(ci->focus, ci->home,
- ci->x >= 0 ? ci->x : p->cx >= 0 ? p->cx : 0,
- ci->y >= 0 ? ci->y : p->cy >= 0 ? p->cy : 0,
+ ci->x == INT_MAX ? p->cx : ci->x,
+ ci->y == INT_MAX ? p->cy : ci->y,
False);
m = vmark_first(p, rl->typenum, p);