diff options
author | Thomas Adam <thomas@xteddy.org> | 2017-05-12 16:01:14 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2017-05-12 16:01:14 +0100 |
commit | 20e30593a596056ba412924272040913b7ec2fd4 (patch) | |
tree | 6cd4d41624a03ddadd1e05810bb2b2d1a288572c /tty.c | |
parent | 7f813dcb6a71b69c06b51a9f28a5319785504e9a (diff) | |
parent | da724fe1c0b71f7aca22632343c94da28f901637 (diff) | |
download | rtmux-20e30593a596056ba412924272040913b7ec2fd4.tar.gz rtmux-20e30593a596056ba412924272040913b7ec2fd4.tar.bz2 rtmux-20e30593a596056ba412924272040913b7ec2fd4.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1080,6 +1080,7 @@ tty_cmd_insertline(struct tty *tty, const struct tty_ctx *ctx) tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); tty_emulate_repeat(tty, TTYC_IL, TTYC_IL1, ctx->num); + tty->cx = tty->cy = UINT_MAX; } void @@ -1100,6 +1101,7 @@ tty_cmd_deleteline(struct tty *tty, const struct tty_ctx *ctx) tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); tty_emulate_repeat(tty, TTYC_DL, TTYC_DL1, ctx->num); + tty->cx = tty->cy = UINT_MAX; } void @@ -1141,18 +1143,20 @@ tty_cmd_clearstartofline(struct tty *tty, const struct tty_ctx *ctx) void tty_cmd_reverseindex(struct tty *tty, const struct tty_ctx *ctx) { + struct window_pane *wp = ctx->wp; + if (ctx->ocy != ctx->orupper) return; if (!tty_pane_full_width(tty, ctx) || - tty_fake_bce(tty, ctx->wp, 8) || + tty_fake_bce(tty, wp, 8) || !tty_term_has(tty->term, TTYC_CSR) || !tty_term_has(tty->term, TTYC_RI)) { tty_redraw_region(tty, ctx); return; } - tty_attributes(tty, &grid_default_cell, ctx->wp); + tty_default_attributes(tty, wp, ctx->bg); tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); tty_margin_off(tty); @@ -1176,7 +1180,7 @@ tty_cmd_linefeed(struct tty *tty, const struct tty_ctx *ctx) return; } - tty_attributes(tty, &grid_default_cell, wp); + tty_default_attributes(tty, wp, ctx->bg); tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); tty_margin_pane(tty, ctx); @@ -1207,7 +1211,7 @@ tty_cmd_scrollup(struct tty *tty, const struct tty_ctx *ctx) return; } - tty_attributes(tty, &grid_default_cell, wp); + tty_default_attributes(tty, wp, ctx->bg); tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); tty_margin_pane(tty, ctx); |