Re: [PATCH BlueZ] shared/shell: add proper line clean to bt_shell_printf

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

 



Hi Denis,

On Fri, Jan 17, 2025 at 1:08 PM Denis Burkov <hitechshell@xxxxxxx> wrote:

We normally expect some description of why this change is required,
for instance what is the output with and without your changes here,
are there artifacts if we don't use rl_clear_visible_line?

> ---
>  src/shared/shell.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/shared/shell.c b/src/shared/shell.c
> index aa6c16c8c..837152525 100644
> --- a/src/shared/shell.c
> +++ b/src/shared/shell.c
> @@ -719,6 +719,7 @@ void bt_shell_printf(const char *fmt, ...)
>                 saved_line = rl_copy_text(0, rl_end);
>                 if (!data.saved_prompt)
>                         rl_save_prompt();
> +               rl_clear_visible_line();
>                 rl_reset_line_state();
>         }
>
> --
> 2.45.2
>
>


-- 
Luiz Augusto von Dentz





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux