console: implement console soft-reset
On soft-reset we reset the console to the initial state but keep current line-state. That is, scrollback and cursor position are kept but the non-visible state is reset. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
2ca0c915a7
commit
10c90c6c5d
@ -620,10 +620,21 @@ void kmscon_console_clear_sb(struct kmscon_console *con)
|
||||
|
||||
void kmscon_console_reset(struct kmscon_console *con)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
if (!con)
|
||||
return;
|
||||
|
||||
/* TODO: reset console */
|
||||
con->flags = 0;
|
||||
con->margin_top = 0;
|
||||
con->margin_bottom = con->size_y - 1;
|
||||
|
||||
for (i = 0; i < con->size_y; ++i) {
|
||||
if (i % 8 == 0)
|
||||
con->tab_ruler[i] = true;
|
||||
else
|
||||
con->tab_ruler[i] = false;
|
||||
}
|
||||
}
|
||||
|
||||
void kmscon_console_set_flags(struct kmscon_console *con, unsigned int flags)
|
||||
|
@ -373,9 +373,8 @@ void kmscon_vte_reset(struct kmscon_vte *vte)
|
||||
vte->flags |= FLAG_AUTO_REPEAT_MODE;
|
||||
vte->flags |= FLAG_SEND_RECEIVE_MODE;
|
||||
vte->flags |= FLAG_AUTO_WRAP_MODE;
|
||||
kmscon_console_reset_flags(vte->con, ~0);
|
||||
kmscon_console_reset(vte->con);
|
||||
kmscon_console_set_flags(vte->con, KMSCON_CONSOLE_AUTO_WRAP);
|
||||
kmscon_console_set_margins(vte->con, 0, 0);
|
||||
|
||||
kmscon_utf8_mach_reset(vte->mach);
|
||||
vte->state = STATE_GROUND;
|
||||
|
Loading…
x
Reference in New Issue
Block a user