Correct pane offsets when clipping both sides.

This commit is contained in:
nicm
2026-10-15 22:29:15 +00:00
committed by tmux update bot
parent 7344f9e595
commit 7447c5f9ae

6
tty.c
View File

@@ -1,4 +1,4 @@
/* $OpenBSD: tty.c,v 1.489 2026/10/14 12:48:50 nicm Exp $ */ /* $OpenBSD: tty.c,v 1.490 2026/10/15 22:29:15 nicm Exp $ */
/* /*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1172,7 +1172,7 @@ tty_clamp_line(struct tty *tty, const struct tty_ctx *ctx, u_int px, u_int py,
*rx = nx; *rx = nx;
} else if (xoff < (int)ctx->wox && xoff + nx > ctx->wox + ctx->wsx) { } else if (xoff < (int)ctx->wox && xoff + nx > ctx->wox + ctx->wsx) {
/* Both left and right not visible. */ /* Both left and right not visible. */
*i = ctx->wox; *i = ctx->wox - xoff;
*x = 0; *x = 0;
*rx = ctx->wsx; *rx = ctx->wsx;
} else if (xoff < (int)ctx->wox) { } else if (xoff < (int)ctx->wox) {
@@ -1266,7 +1266,7 @@ tty_clamp_area(struct tty *tty, const struct tty_ctx *ctx, u_int px, u_int py,
*rx = nx; *rx = nx;
} else if (xoff < ctx->wox && xoff + nx > ctx->wox + ctx->wsx) { } else if (xoff < ctx->wox && xoff + nx > ctx->wox + ctx->wsx) {
/* Both left and right not visible. */ /* Both left and right not visible. */
*i = ctx->wox; *i = ctx->wox - xoff;
*x = 0; *x = 0;
*rx = ctx->wsx; *rx = ctx->wsx;
} else if (xoff < ctx->wox) { } else if (xoff < ctx->wox) {