Skip to content

Commit 8160dd0

Browse files
no1wudixiaoxiang781216
authored andcommitted
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>
1 parent 4f04151 commit 8160dd0

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

system/readline/readline_common.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -708,11 +708,6 @@ ssize_t readline_common(FAR struct rl_common_s *vtbl, FAR char *buf,
708708
buf[nch++] = '\n';
709709
buf[nch] = '\0';
710710

711-
#ifdef CONFIG_READLINE_ECHO
712-
/* Echo the newline to the console */
713-
714-
RL_PUTC(vtbl, '\n');
715-
#endif
716711
return nch;
717712
}
718713

@@ -724,11 +719,6 @@ ssize_t readline_common(FAR struct rl_common_s *vtbl, FAR char *buf,
724719
{
725720
buf[nch++] = ch;
726721

727-
#ifdef CONFIG_READLINE_ECHO
728-
/* Echo the character to the console */
729-
730-
RL_PUTC(vtbl, ch);
731-
#endif
732722
/* Check if there is room for another character and the line's
733723
* null terminator. If not then we have to end the line now.
734724
*/

0 commit comments

Comments
 (0)