diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-08-21 12:29:59 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-08-21 12:29:59 +0000 |
commit | 926b52b6002164b4bc82624674d488e7fe1e42c2 (patch) | |
tree | 0db247f61fdcfeeeda5f30cb95344bf653224070 /tty.c | |
parent | 915a1913e19dd254689f51bc228686f83f2d77ee (diff) | |
download | rtmux-926b52b6002164b4bc82624674d488e7fe1e42c2.tar.gz rtmux-926b52b6002164b4bc82624674d488e7fe1e42c2.tar.bz2 rtmux-926b52b6002164b4bc82624674d488e7fe1e42c2.zip |
Emulate dch/dch1 if missing by redrawing the entire line.
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -596,7 +596,9 @@ tty_cmd_deletecharacter(struct tty *tty, const struct tty_ctx *ctx) struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; - if (wp->xoff != 0 || screen_size_x(s) < tty->sx) { + if (wp->xoff != 0 || screen_size_x(s) < tty->sx || + (!tty_term_has(tty->term, TTYC_DCH) && + !tty_term_has(tty->term, TTYC_DCH1))) { tty_draw_line(tty, wp->screen, ctx->ocy, wp->xoff, wp->yoff); return; } @@ -604,7 +606,9 @@ tty_cmd_deletecharacter(struct tty *tty, const struct tty_ctx *ctx) tty_reset(tty); tty_cursor(tty, ctx->ocx, ctx->ocy, wp->xoff, wp->yoff); - tty_emulate_repeat(tty, TTYC_DCH, TTYC_DCH1, ctx->num); + if (tty_term_has(tty->term, TTYC_DCH) || + tty_term_has(tty->term, TTYC_DCH1)) + tty_emulate_repeat(tty, TTYC_DCH, TTYC_DCH1, ctx->num); } void |