diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2018-09-24 12:17:29 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2018-09-24 12:17:29 +0100 |
commit | ad71e7f9d247e4745cf80c7ec6f698e959adb99f (patch) | |
tree | 31b10f94492592f36257ff4e1dfb800d05fbf0a5 /screen-redraw.c | |
parent | 71d2ab184b906885ba21f5d6905490bbc5d67d9f (diff) | |
download | rtmux-ad71e7f9d247e4745cf80c7ec6f698e959adb99f.tar.gz rtmux-ad71e7f9d247e4745cf80c7ec6f698e959adb99f.tar.bz2 rtmux-ad71e7f9d247e4745cf80c7ec6f698e959adb99f.zip |
Calculate size when trimming RHS correctly.
Diffstat (limited to 'screen-redraw.c')
-rw-r--r-- | screen-redraw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/screen-redraw.c b/screen-redraw.c index a10acd97..167389b4 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -368,7 +368,7 @@ screen_redraw_draw_pane_status(struct screen_redraw_ctx *ctx) /* Right not visible. */ i = 0; x = xoff - ctx->ox; - width = size - (xoff + size - ctx->sx); + width = size - x; } if (ctx->top) @@ -628,7 +628,7 @@ screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp) /* Right not visible. */ i = 0; x = wp->xoff - ctx->ox; - width = wp->sx - (wp->xoff + wp->sx - ctx->sx); + width = ctx->sx - x; } log_debug("%s: %s %%%u line %u,%u at %u,%u, width %u", __func__, c->name, wp->id, i, j, x, y, width); @@ -674,7 +674,7 @@ screen_redraw_draw_number(struct screen_redraw_ctx *ctx, struct window_pane *wp) } else { /* Right not visible. */ xoff = wp->xoff - ctx->ox; - sx = wp->sx - (wp->xoff + wp->sx - ctx->sx); + sx = wp->sx - xoff; } if (wp->yoff >= ctx->oy && wp->yoff + wp->sy <= ctx->oy + ctx->sy) { /* All visible. */ @@ -692,7 +692,7 @@ screen_redraw_draw_number(struct screen_redraw_ctx *ctx, struct window_pane *wp) } else { /* Bottom not visible. */ yoff = wp->yoff - ctx->oy; - sy = wp->sy - (wp->yoff + wp->sy - ctx->sy); + sy = wp->sy - yoff; } if (ctx->top) |