diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2011-10-23 10:16:14 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2011-10-23 10:16:14 +0000 |
commit | f0aad68aeef493954d3a840bea134abd22b37c2d (patch) | |
tree | a02b92fcc0ce1bb8ad8883ff631ebb1e593d28ca /screen-write.c | |
parent | 7ff4cf94050e11517bb6fa89be2f5f4c85af12e3 (diff) | |
download | rtmux-f0aad68aeef493954d3a840bea134abd22b37c2d.tar.gz rtmux-f0aad68aeef493954d3a840bea134abd22b37c2d.tar.bz2 rtmux-f0aad68aeef493954d3a840bea134abd22b37c2d.zip |
Support for \e[3J to clear the history. Also send the corresponding
terminfo code (E3) before locking.
Diffstat (limited to 'screen-write.c')
-rw-r--r-- | screen-write.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/screen-write.c b/screen-write.c index 60623701..d1d02c7c 100644 --- a/screen-write.c +++ b/screen-write.c @@ -985,6 +985,17 @@ screen_write_clearscreen(struct screen_write_ctx *ctx) tty_write(tty_cmd_clearscreen, &ttyctx); } +/* Clear entire history. */ +void +screen_write_clearhistory(struct screen_write_ctx *ctx) +{ + struct screen *s = ctx->s; + struct grid *gd = s->grid; + + grid_move_lines(gd, 0, gd->hsize, gd->sy); + gd->hsize = 0; +} + /* Write cell data. */ void screen_write_cell(struct screen_write_ctx *ctx, |