diff options
author | 2011-10-23 10:16:14 +0000 | |
---|---|---|
committer | 2011-10-23 10:16:14 +0000 | |
commit | 786c44dced1aee01244b69cbacea2961ce4ef3aa (patch) | |
tree | d78813b73bff2c86bf3c6043a037566772812416 /usr.bin/tmux/screen-write.c | |
parent | fsqueue no longer stores envelopes by dumping the structure, instead use a (diff) | |
download | wireguard-openbsd-786c44dced1aee01244b69cbacea2961ce4ef3aa.tar.xz wireguard-openbsd-786c44dced1aee01244b69cbacea2961ce4ef3aa.zip |
Support for \e[3J to clear the history. Also send the corresponding
terminfo code (E3) before locking.
Diffstat (limited to 'usr.bin/tmux/screen-write.c')
-rw-r--r-- | usr.bin/tmux/screen-write.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c index f6cbe344910..f56c7460ac7 100644 --- a/usr.bin/tmux/screen-write.c +++ b/usr.bin/tmux/screen-write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-write.c,v 1.50 2011/05/18 20:24:29 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.51 2011/10/23 10:16:14 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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, |