Allow cmd_mouse_at return arguments to be NULL.

pull/84/merge
nicm 2016-10-05 12:32:13 +00:00
parent 1b31d148c9
commit b4f95c43fc
1 changed files with 4 additions and 2 deletions

6
cmd.c
View File

@ -601,8 +601,10 @@ cmd_mouse_at(struct window_pane *wp, struct mouse_event *m, u_int *xp,
if (y < wp->yoff || y >= wp->yoff + wp->sy)
return (-1);
*xp = x - wp->xoff;
*yp = y - wp->yoff;
if (xp != NULL)
*xp = x - wp->xoff;
if (yp != NULL)
*yp = y - wp->yoff;
return (0);
}