mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
monitor: Improve mux'ed console experience (Jan Kiszka)
Up to now, you never really knew if you already switched the console after pressing CTRL-A C or if you mistyped it again. This patch clarifies the situation by providing a prompt in a new line and injecting a linebreak when switching away again. For this purpose, the two events CHR_EVENT_MUX_IN and CHR_EVENT_MUX_OUT are introduced and distributed on focus switches. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6716 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
731b03642d
commit
2724b1806a
5 changed files with 42 additions and 10 deletions
|
@ -444,6 +444,11 @@ void readline_start(ReadLineState *rs, const char *prompt, int read_password,
|
|||
rs->readline_func = readline_func;
|
||||
rs->readline_opaque = opaque;
|
||||
rs->read_password = read_password;
|
||||
readline_restart(rs);
|
||||
}
|
||||
|
||||
void readline_restart(ReadLineState *rs)
|
||||
{
|
||||
rs->cmd_buf_index = 0;
|
||||
rs->cmd_buf_size = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue