summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/screen-write.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2011-10-23 10:16:15 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2011-10-23 10:16:15 +0000
commitfdbae048113f7f555bbcb7926a3f623b8c8a6a47 (patch)
tree0eaaebc1e075d9450d1b60e29edc87bdf1c992f4 /usr.bin/tmux/screen-write.c
parente3cfbeb71221f3f3bee3fcbfef00515742b2db32 (diff)
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,