aboutsummaryrefslogtreecommitdiff
path: root/screen-write.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2018-08-20 19:34:04 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2018-08-20 19:34:04 +0100
commit31508228bc26306a7fbf138c9df2e7210e9e5a37 (patch)
treef112fdaa2b24f40358679b18bdaba5a04559d1af /screen-write.c
parent1e8c9fb4904ed2d7c712f676704503e94f236130 (diff)
downloadrtmux-31508228bc26306a7fbf138c9df2e7210e9e5a37.tar.gz
rtmux-31508228bc26306a7fbf138c9df2e7210e9e5a37.tar.bz2
rtmux-31508228bc26306a7fbf138c9df2e7210e9e5a37.zip
Use the y offset from the context which has already been adjusted for
the status line, also make tty_clamp_line adjust the y position.
Diffstat (limited to 'screen-write.c')
-rw-r--r--screen-write.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/screen-write.c b/screen-write.c
index b9db16a9..4f5bee61 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -94,7 +94,7 @@ void
screen_write_start(struct screen_write_ctx *ctx, struct window_pane *wp,
struct screen *s)
{
- char tmp[16];
+ char tmp[32];
u_int y;
memset(ctx, 0, sizeof *ctx);
@@ -113,8 +113,10 @@ screen_write_start(struct screen_write_ctx *ctx, struct window_pane *wp,
ctx->scrolled = 0;
ctx->bg = 8;
- if (wp != NULL)
- snprintf(tmp, sizeof tmp, "pane %%%u", wp->id);
+ if (wp != NULL) {
+ snprintf(tmp, sizeof tmp, "pane %%%u (at %u,%u)", wp->id,
+ wp->xoff, wp->yoff);
+ }
log_debug("%s: size %ux%u, %s", __func__, screen_size_x(ctx->s),
screen_size_y(ctx->s), wp == NULL ? "no pane" : tmp);
}