summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/screen-write.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2011-10-23 10:16:14 +0000
committernicm <nicm@openbsd.org>2011-10-23 10:16:14 +0000
commit786c44dced1aee01244b69cbacea2961ce4ef3aa (patch)
treed78813b73bff2c86bf3c6043a037566772812416 /usr.bin/tmux/screen-write.c
parentfsqueue no longer stores envelopes by dumping the structure, instead use a (diff)
downloadwireguard-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.c13
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,