readline: Don't echo input except VT100 command
Let's echo character by serial driver, this will imporve the experience of telnetd, which will display input command and newline twice. And also enhance the compatiblity with some third party linux readline based application (like WAMR repl). Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
parent
4f04151f17
commit
8160dd0d56
@ -708,11 +708,6 @@ ssize_t readline_common(FAR struct rl_common_s *vtbl, FAR char *buf,
|
||||
buf[nch++] = '\n';
|
||||
buf[nch] = '\0';
|
||||
|
||||
#ifdef CONFIG_READLINE_ECHO
|
||||
/* Echo the newline to the console */
|
||||
|
||||
RL_PUTC(vtbl, '\n');
|
||||
#endif
|
||||
return nch;
|
||||
}
|
||||
|
||||
@ -724,11 +719,6 @@ ssize_t readline_common(FAR struct rl_common_s *vtbl, FAR char *buf,
|
||||
{
|
||||
buf[nch++] = ch;
|
||||
|
||||
#ifdef CONFIG_READLINE_ECHO
|
||||
/* Echo the character to the console */
|
||||
|
||||
RL_PUTC(vtbl, ch);
|
||||
#endif
|
||||
/* Check if there is room for another character and the line's
|
||||
* null terminator. If not then we have to end the line now.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user