diff --git a/micropython/aiorepl/aiorepl.py b/micropython/aiorepl/aiorepl.py index 326e00ba..36f601c3 100644 --- a/micropython/aiorepl/aiorepl.py +++ b/micropython/aiorepl/aiorepl.py @@ -110,7 +110,12 @@ async def task(g=None, prompt="--> "): t = time.ticks_ms() if c < 0x20 or c > 0x7E: if c == 0x0A: - # CR + # LF + # If the previous character was also LF, and was less + # than 20 ms ago, this was likely due to CRLF->LFLF + # conversion, so ignore this linefeed. + if pc == 0x0A and time.ticks_diff(t, pt) < 20: + continue sys.stdout.write("\n") if cmd: # Push current command.