diff options
author | Tiago Cunha <tcunha@gmx.com> | 2011-10-23 15:10:22 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2011-10-23 15:10:22 +0000 |
commit | 03ee7f7edf9d0d38ce2fc00b1137693fa857e8d8 (patch) | |
tree | cc841f52aa23908e7294e9f5dc98c66213933fec /screen-write.c | |
parent | a8ca1340ad1217a6512ce21586f05102c4000cc9 (diff) | |
download | rtmux-03ee7f7edf9d0d38ce2fc00b1137693fa857e8d8.tar.gz rtmux-03ee7f7edf9d0d38ce2fc00b1137693fa857e8d8.tar.bz2 rtmux-03ee7f7edf9d0d38ce2fc00b1137693fa857e8d8.zip |
Sync OpenBSD patchset 969:
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 f05d7bbc..7559a773 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, |