diff options
author | 2009-08-21 12:29:59 +0000 | |
---|---|---|
committer | 2009-08-21 12:29:59 +0000 | |
commit | 234cb327764f33261d65aaa283629589f545f51a (patch) | |
tree | 2143f181108a30fc3866b81a547e797f967c79dd | |
parent | - change two variables to daddr64_t, eventhough they won't overflow (diff) | |
download | wireguard-openbsd-234cb327764f33261d65aaa283629589f545f51a.tar.xz wireguard-openbsd-234cb327764f33261d65aaa283629589f545f51a.zip |
Emulate dch/dch1 if missing by redrawing the entire line.
-rw-r--r-- | usr.bin/tmux/tty-term.c | 6 | ||||
-rw-r--r-- | usr.bin/tmux/tty.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/tmux/tty-term.c b/usr.bin/tmux/tty-term.c index 195ed55e546..d3f5d664619 100644 --- a/usr.bin/tmux/tty-term.c +++ b/usr.bin/tmux/tty-term.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty-term.c,v 1.7 2009/08/05 19:05:02 nicm Exp $ */ +/* $OpenBSD: tty-term.c,v 1.8 2009/08/21 12:29:59 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -338,10 +338,6 @@ tty_term_find(char *name, int fd, const char *overrides, char **cause) "terminal does not support ich1 or ich or smir and rmir"); goto error; } - if (!tty_term_has(term, TTYC_DCH1) && !tty_term_has(term, TTYC_DCH)) { - xasprintf(cause, "terminal does not support dch1 or dch"); - goto error; - } /* * Figure out if terminal support default colours. AX is a screen diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 26c5ceb021b..8081c30c56e 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.25 2009/08/14 08:53:52 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.26 2009/08/21 12:29:59 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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 |