qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Hani Benhabiles <kroosec@gmail.com>
Cc: kwolf@redhat.com, qemu-trivial@nongnu.org, qemu-devel@nongnu.org,
	stefanha@redhat.com, xiawenc@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH] readline: Clear screen on form feed.
Date: Tue, 10 Jun 2014 09:40:10 -0400	[thread overview]
Message-ID: <20140610094010.01354730@redhat.com> (raw)
In-Reply-To: <1401623615-7548-1-git-send-email-kroosec@gmail.com>

On Sun,  1 Jun 2014 12:53:35 +0100
Hani Benhabiles <kroosec@gmail.com> wrote:

> Signed-off-by: Hani Benhabiles <hani@linux.com>

Applied to the qmp branch, thanks.

Btw, we don't add a period to the end of the first line in the changelog.

> ---
>  util/readline.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/util/readline.c b/util/readline.c
> index 8baec55..08d07e3 100644
> --- a/util/readline.c
> +++ b/util/readline.c
> @@ -345,6 +345,12 @@ static void readline_completion(ReadLineState *rs)
>      }
>  }
>  
> +static void readline_clear_screen(ReadLineState *rs)
> +{
> +    rs->printf_func(rs->opaque, "\033[2J\033[1;1H");
> +    readline_show_prompt(rs);
> +}
> +
>  /* return true if command handled */
>  void readline_handle_byte(ReadLineState *rs, int ch)
>  {
> @@ -363,6 +369,9 @@ void readline_handle_byte(ReadLineState *rs, int ch)
>          case 9:
>              readline_completion(rs);
>              break;
> +        case 12:
> +            readline_clear_screen(rs);
> +            break;
>          case 10:
>          case 13:
>              rs->cmd_buf[rs->cmd_buf_size] = '\0';

      parent reply	other threads:[~2014-06-10 13:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-01 11:53 [Qemu-devel] [PATCH] readline: Clear screen on form feed Hani Benhabiles
2014-06-02 12:20 ` Stefan Hajnoczi
2014-06-02 21:49   ` Hani Benhabiles
2014-06-08 14:03 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2014-06-09 20:32 ` [Qemu-devel] " Luiz Capitulino
2014-06-09 23:00   ` Hani Benhabiles
2014-06-10 13:40 ` Luiz Capitulino [this message]

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=20140610094010.01354730@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=kroosec@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=xiawenc@linux.vnet.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).