=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/screen-write.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- src/usr.bin/tmux/screen-write.c 2011/05/18 20:24:29 1.50 +++ src/usr.bin/tmux/screen-write.c 2011/10/23 10:16:14 1.51 @@ -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 @@ -983,6 +983,17 @@ } 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. */