1
0
mirror of https://github.com/tmux/tmux.git synced 2025-04-01 21:41:44 +00:00

Fix some comments (top/bottom not left/right).

This commit is contained in:
nicm 2019-06-26 13:05:06 +00:00
parent d83f356218
commit 80d76612b8

6
tty.c
View File

@ -1060,17 +1060,17 @@ tty_clamp_area(struct tty *tty, const struct tty_ctx *ctx, u_int px, u_int py,
*y = ctx->yoff + py - ctx->oy; *y = ctx->yoff + py - ctx->oy;
*ry = ny; *ry = ny;
} else if (yoff < ctx->oy && yoff + ny > ctx->oy + ctx->sy) { } else if (yoff < ctx->oy && yoff + ny > ctx->oy + ctx->sy) {
/* Both left and right not visible. */ /* Both top and bottom not visible. */
*j = ctx->oy; *j = ctx->oy;
*y = 0; *y = 0;
*ry = ctx->sy; *ry = ctx->sy;
} else if (yoff < ctx->oy) { } else if (yoff < ctx->oy) {
/* Left not visible. */ /* Top not visible. */
*j = ctx->oy - (ctx->yoff + py); *j = ctx->oy - (ctx->yoff + py);
*y = 0; *y = 0;
*ry = ny - *j; *ry = ny - *j;
} else { } else {
/* Right not visible. */ /* Bottom not visible. */
*j = 0; *j = 0;
*y = (ctx->yoff + py) - ctx->oy; *y = (ctx->yoff + py) - ctx->oy;
*ry = ctx->sy - *y; *ry = ctx->sy - *y;