summaryrefslogtreecommitdiffstats
path: root/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-05-22 09:37:54 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-05-22 09:37:54 +0000
commit82b053a81135c0873f9aa8824386e63abd48bbc4 (patch)
treed7c8c644df4d989635326fd84af348732c280a82 /tty.c
parent2f93affb988ecdae1cfd3fb73801ce5b943a6525 (diff)
Use tty_pane_full_width macro in some more places.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tty.c b/tty.c
index 91ef75bd..5eb37ade 100644
--- a/tty.c
+++ b/tty.c
@@ -740,9 +740,8 @@ void
tty_cmd_insertcharacter(struct tty *tty, const struct tty_ctx *ctx)
{
struct window_pane *wp = ctx->wp;
- struct screen *s = wp->screen;
- if (ctx->xoff != 0 || screen_size_x(s) < tty->sx) {
+ if (!tty_pane_full_width(tty, ctx)) {
tty_draw_line(tty, wp->screen, ctx->ocy, ctx->xoff, ctx->yoff);
return;
}
@@ -762,9 +761,8 @@ void
tty_cmd_deletecharacter(struct tty *tty, const struct tty_ctx *ctx)
{
struct window_pane *wp = ctx->wp;
- struct screen *s = wp->screen;
- if (ctx->xoff != 0 || screen_size_x(s) < tty->sx ||
+ if (!tty_pane_full_width(tty, ctx) ||
(!tty_term_has(tty->term, TTYC_DCH) &&
!tty_term_has(tty->term, TTYC_DCH1))) {
tty_draw_line(tty, wp->screen, ctx->ocy, ctx->xoff, ctx->yoff);