cli_readline: Only insert printable chars
PATCH 1/1 cli_readline: Only insert printable chars
There should be no need to insert non-printable characters and this prevents line editing getting confused.
Signed-off-by Steve Bennett <[email protected]>
--- common/cli_readline.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
common/cli_readline.c +4 -2
@@ -493,8 +493,10 @@ static int cread_line(const char *const prompt, char *buf, unsigned int *len, }#endif default : -cread_add_char (ichar, insert, &num, &eol_num, buf, - *len); +if (ichar >=' ' && ichar <='~' ) { +cread_add_char (ichar, insert, &num, &eol_num, + buf, *len); + }break ; } }
Signature · 1 line
2.24.2 (Apple Git-127)
PATCH 1/1 cli_readline: Only insert printable chars
Quoted 4 lines · Steve Bennett
There should be no need to insert non-printable characters and this prevents line editing getting confused.
Signed-off-by Steve Bennett <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210118/6edda5dc/attachment.sig>