Closed jpellegrini closed 2 years ago
pForth should definitely echo each character as it is typed. It seems like the Terminal is configured to cache output until a newline.
This might be worth a try in your terminal initialization code in sdTerminalInit in pf_io_posix.c:
setvbuf(stdout, nullptr, _IONBF, (size_t) 0);
You can also try:
ECHO ON
but I suspect it will not help.
Calling setvbuf
fixes it! Thank you! :smiley:
Is this something you'd be changing in pforth? Because if not, I can keep a patch with my OpenWRT packages, no problem.
I have made an (unofficial) package of PForth for OpenWRT (see #86 ). PForth runs fine, but without echoing input when the user types (the line is echoed at once when I type return). This is strange because I remember having seeing in the source that PForth flushes the output after each char (or am I wrong?)