summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2012-05-22 09:37:55 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2012-05-22 09:37:55 +0000
commit2cfffe2cb66f4c526bcd67581871c672f4882be6 (patch)
treef5b1c03eebc39c259a25ff114bb4cad24af1eabc /usr.bin/tmux/tty.c
parente4f16e73e6ca7d18033c64356b320d6dc69fdb55 (diff)
Use tty_pane_full_width macro in some more places.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r--usr.bin/tmux/tty.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index aa067f13574..74655a5cdd2 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.134 2012/05/22 09:36:12 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.135 2012/05/22 09:37:54 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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);