qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [PATCH] readline: Clear screen on form feed.


From: Luiz Capitulino
Subject: Re: [Qemu-trivial] [PATCH] readline: Clear screen on form feed.
Date: Tue, 10 Jun 2014 09:40:10 -0400

On Sun,  1 Jun 2014 12:53:35 +0100
Hani Benhabiles <address@hidden> wrote:

> Signed-off-by: Hani Benhabiles <address@hidden>

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';




reply via email to

[Prev in Thread] Current Thread [Next in Thread]