=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty.c,v retrieving revision 1.145 retrieving revision 1.146 diff -u -r1.145 -r1.146 --- src/usr.bin/tmux/tty.c 2012/11/22 14:41:11 1.145 +++ src/usr.bin/tmux/tty.c 2013/01/15 23:18:55 1.146 @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.145 2012/11/22 14:41:11 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.146 2013/01/15 23:18:55 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -716,6 +716,23 @@ 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 +tty_cmd_clearcharacter(struct tty *tty, const struct tty_ctx *ctx) +{ + u_int i; + + tty_reset(tty); + + tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); + + if (tty_term_has(tty->term, TTYC_ECH)) + tty_putcode1(tty, TTYC_ECH, ctx->num); + else { + for (i = 0; i < ctx->num; i++) + tty_putc(tty, ' '); + } } void