public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qemu: reset more state after CR/LF
@ 2007-08-13 14:19 Jim Paris
       [not found] ` <1187014773813-git-send-email-jim-XrPbb/hENzg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Paris @ 2007-08-13 14:19 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	avi-atKUWr5tajBWk0Htik3J/w
  Cc: Jim Paris

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 <jim-XrPbb/hENzg@public.gmane.org>
---

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/

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] qemu: reset more state after CR/LF
       [not found] ` <1187014773813-git-send-email-jim-XrPbb/hENzg@public.gmane.org>
@ 2007-08-13 16:09   ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2007-08-13 16:09 UTC (permalink / raw)
  To: Jim Paris; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Jim Paris wrote:
> 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.
>
>   

Applied, thanks.  Please submit to qemu-devel as well.

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-13 16:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-13 14:19 [PATCH] qemu: reset more state after CR/LF Jim Paris
     [not found] ` <1187014773813-git-send-email-jim-XrPbb/hENzg@public.gmane.org>
2007-08-13 16:09   ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox