After receiving CR or LF on the monitor, reset term_last_cmd_* as
well. This matches the setup that is done by term_show_prompt(), and is
for the case when readline_start() is not called before the next
readline_handle_byte(). Without this, unnecessary terminal escape
sequences will be printed by term_update() before the next prompt.
Signed-off-by: Jim Paris <[EMAIL PROTECTED]>
---
Avi, this goes along with 076e405adda6b47563e23ac24b57c8bb8ba55488,
"qemu: reset buffer pointers after CR/LF", which wasn't quite complete.
Thanks.
qemu/readline.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/qemu/readline.c b/qemu/readline.c
index bde3342..0a02b08 100644
--- a/qemu/readline.c
+++ b/qemu/readline.c
@@ -337,6 +337,8 @@ void readline_handle_byte(int ch)
term_printf("\n");
term_cmd_buf_index = 0;
term_cmd_buf_size = 0;
+ term_last_cmd_buf_index = 0;
+ term_last_cmd_buf_size = 0;
/* NOTE: readline_start can be called here */
term_readline_func(term_readline_opaque, term_cmd_buf);
break;
--
1.5.3.rc4
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel