diff options
author | 2016-10-03 19:19:18 +0000 | |
---|---|---|
committer | 2016-10-03 19:19:18 +0000 | |
commit | 938aefe11693e5022562120087700da4690feded (patch) | |
tree | a8fbe70735096adab9524e9ae2416d0871121922 /usr.bin/tmux/tty.c | |
parent | sync (diff) | |
download | wireguard-openbsd-938aefe11693e5022562120087700da4690feded.tar.xz wireguard-openbsd-938aefe11693e5022562120087700da4690feded.zip |
Remove some redundant checks and make ich/dch consistent.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r-- | usr.bin/tmux/tty.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index c7c6500259e..9514578fbeb 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.205 2016/07/15 00:49:08 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.206 2016/10/03 19:19:18 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -747,7 +747,9 @@ tty_cmd_insertcharacter(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; - if (!tty_pane_full_width(tty, ctx)) { + if (!tty_pane_full_width(tty, ctx) || tty_fake_bce(tty, wp) || + (!tty_term_has(tty->term, TTYC_DCH) && + !tty_term_has(tty->term, TTYC_DCH1))) { tty_draw_pane(tty, wp, ctx->ocy, ctx->xoff, ctx->yoff); return; } @@ -756,11 +758,7 @@ tty_cmd_insertcharacter(struct tty *tty, const struct tty_ctx *ctx) tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); - if (!tty_fake_bce(tty, wp) && (tty_term_has(tty->term, TTYC_ICH) || - tty_term_has(tty->term, TTYC_ICH1))) - tty_emulate_repeat(tty, TTYC_ICH, TTYC_ICH1, ctx->num); - else - tty_draw_pane(tty, wp, ctx->ocy, ctx->xoff, ctx->yoff); + tty_emulate_repeat(tty, TTYC_ICH, TTYC_ICH1, ctx->num); } void @@ -779,9 +777,7 @@ tty_cmd_deletecharacter(struct tty *tty, const struct tty_ctx *ctx) tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); - 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); + tty_emulate_repeat(tty, TTYC_DCH, TTYC_DCH1, ctx->num); } void |