Sync OpenBSD patchset 1004:

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:
Tiago Cunha
2012-01-21 19:31:59 +00:00
parent 674de910ca
commit 4bea559037
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(