aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2018-09-12 07:15:27 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2018-09-12 07:15:27 +0100
commit71d2ab184b906885ba21f5d6905490bbc5d67d9f (patch)
tree86c83892ab8a14b5b2e00bc86fe6ac6cf6910109
parentc067af8e7d5cbc796b6c8ab2aaece0d25efb0342 (diff)
downloadrtmux-71d2ab184b906885ba21f5d6905490bbc5d67d9f.tar.gz
rtmux-71d2ab184b906885ba21f5d6905490bbc5d67d9f.tar.bz2
rtmux-71d2ab184b906885ba21f5d6905490bbc5d67d9f.zip
Fix up merge.
-rw-r--r--tty.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/tty.c b/tty.c
index 9a5b019d..10ae1617 100644
--- a/tty.c
+++ b/tty.c
@@ -1698,7 +1698,10 @@ tty_cmd_alignmenttest(struct tty *tty, const struct tty_ctx *ctx)
void
tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
{
- if (ctx->xoff + ctx->ocx > tty->sx - 1 &&
+ if (!tty_is_visible(tty, ctx, ctx->ocx, ctx->ocy, 1, 1))
+ return;
+
+ if (ctx->xoff + ctx->ocx - ctx->ox > tty->sx - 1 &&
ctx->ocy == ctx->orlower &&
tty_pane_full_width(tty, ctx))
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
@@ -1712,6 +1715,26 @@ tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
void
tty_cmd_cells(struct tty *tty, const struct tty_ctx *ctx)
{
+ struct window_pane *wp = ctx->wp;
+
+ if (!tty_is_visible(tty, ctx, ctx->ocx, ctx->ocy, ctx->num, 1))
+ return;
+
+ if (ctx->bigger &&
+ (ctx->ocx < ctx->ox || ctx->ocx + ctx->num > ctx->ox + ctx->sx)) {
+ if (!ctx->wrapped ||
+ !tty_pane_full_width(tty, ctx) ||
+ (tty->term->flags & TERM_EARLYWRAP) ||
+ ctx->xoff + ctx->ocx != 0 ||
+ ctx->yoff + ctx->ocy != tty->cy + 1 ||
+ tty->cx < tty->sx ||
+ tty->cy == tty->rlower)
+ tty_draw_pane(tty, ctx, ctx->ocy);
+ else
+ wp->flags |= PANE_REDRAW;
+ return;
+ }
+
tty_margin_off(tty);
tty_cursor_pane_unless_wrap(tty, ctx, ctx->ocx, ctx->ocy);