aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2018-09-11 20:11:11 +0100
committerThomas Adam <thomas@xteddy.org>2018-09-11 20:11:11 +0100
commitc067af8e7d5cbc796b6c8ab2aaece0d25efb0342 (patch)
tree8027058a8ff9466bc6670f1c1df6084c3e570027 /tty.c
parent3fa538181b1e1fb4c9414f49013a3e5839c2e2cb (diff)
parentbe2201200f21c074b35c9c31034b7bdf6cd76721 (diff)
downloadrtmux-c067af8e7d5cbc796b6c8ab2aaece0d25efb0342.tar.gz
rtmux-c067af8e7d5cbc796b6c8ab2aaece0d25efb0342.tar.bz2
rtmux-c067af8e7d5cbc796b6c8ab2aaece0d25efb0342.zip
Merge branch 'obsd-master'
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c36
1 files changed, 6 insertions, 30 deletions
diff --git a/tty.c b/tty.c
index ac24a7f2..9a5b019d 100644
--- a/tty.c
+++ b/tty.c
@@ -1698,17 +1698,12 @@ tty_cmd_alignmenttest(struct tty *tty, const struct tty_ctx *ctx)
void
tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
{
- 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) {
- if (tty_pane_full_width(tty, ctx))
- tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
- else
- tty_margin_off(tty);
- }
+ if (ctx->xoff + ctx->ocx > tty->sx - 1 &&
+ ctx->ocy == ctx->orlower &&
+ tty_pane_full_width(tty, ctx))
+ tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
+ tty_margin_off(tty);
tty_cursor_pane_unless_wrap(tty, ctx, ctx->ocx, ctx->ocy);
tty_cell(tty, ctx->cell, ctx->wp);
@@ -1717,26 +1712,7 @@ 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);
tty_attributes(tty, ctx->cell, ctx->wp);