From befbff31b73d5373b5933a3762a3a3c6e871e8da Mon Sep 17 00:00:00 2001 From: scottbelden Date: Tue, 7 May 2019 13:55:20 -0400 Subject: [PATCH] py/repl: Enter four spaces when there are no matches. Originally at adafruit#1859 Signed-off-by: scottbelden --- py/repl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/py/repl.c b/py/repl.c index 3b1837031b..a8ae1d0695 100644 --- a/py/repl.c +++ b/py/repl.c @@ -228,6 +228,10 @@ size_t mp_repl_autocomplete(const char *str, size_t len, const mp_print_t *print // nothing found if (q_first == 0) { + if (s_len == 0) { + *compl_str = " "; + return 4; + } // If there're no better alternatives, and if it's first word // in the line, try to complete "import". if (s_start == org_str) {