Add a -R flag to send-keys to reset the terminal. Written ages ago and

Suggested by someone, I forget who.
This commit is contained in:
Nicholas Marriott
2012-01-21 08:10:21 +00:00
parent cd10f7322a
commit 66f04514cf
5 changed files with 44 additions and 13 deletions

View File

@ -46,6 +46,24 @@ screen_write_stop(unused struct screen_write_ctx *ctx)
{
}
/* Reset screen state. */
void
screen_write_reset(struct screen_write_ctx *ctx)
{
screen_reset_tabs(ctx->s);
screen_write_scrollregion(ctx, 0, screen_size_y(ctx->s) - 1);
screen_write_insertmode(ctx, 0);
screen_write_kcursormode(ctx, 0);
screen_write_kkeypadmode(ctx, 0);
screen_write_mousemode_off(ctx);
screen_write_clearscreen(ctx);
screen_write_cursormove(ctx, 0, 0);
}
/* Write character. */
void
screen_write_putc(