aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-08-21 21:15:00 +0000
committerTiago Cunha <tcunha@gmx.com>2009-08-21 21:15:00 +0000
commit633e74ef805f30049b808c067963aba3309f0d47 (patch)
tree551d226fd70cc35b4127748cfb8ebc34e6ae342f /tty.c
parent1fa8a8f4a6a2d942896fc4c5c04563826c9a6f70 (diff)
downloadrtmux-633e74ef805f30049b808c067963aba3309f0d47.tar.gz
rtmux-633e74ef805f30049b808c067963aba3309f0d47.tar.bz2
rtmux-633e74ef805f30049b808c067963aba3309f0d47.zip
Sync OpenBSD patchset 287:
Emulate dch/dch1 if missing by redrawing the entire line.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tty.c b/tty.c
index ef47391c..74dd6f8e 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.129 2009-08-19 09:00:06 nicm Exp $ */
+/* $Id: tty.c,v 1.130 2009-08-21 21:15:00 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -604,7 +604,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;
}
@@ -612,7 +614,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