All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Paris <jim-XrPbb/hENzg@public.gmane.org>
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org
Cc: Jim Paris <jim-XrPbb/hENzg@public.gmane.org>
Subject: [PATCH] qemu: reset more state after CR/LF
Date: Mon, 13 Aug 2007 10:19:33 -0400	[thread overview]
Message-ID: <1187014773813-git-send-email-jim@jtan.com> (raw)

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/

             reply	other threads:[~2007-08-13 14:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-13 14:19 Jim Paris [this message]
     [not found] ` <1187014773813-git-send-email-jim-XrPbb/hENzg@public.gmane.org>
2007-08-13 16:09   ` [PATCH] qemu: reset more state after CR/LF Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1187014773813-git-send-email-jim@jtan.com \
    --to=jim-xrpbb/henzg@public.gmane.org \
    --cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.