diff options
author | scottbelden <scottabelden@gmail.com> | 2019-05-07 13:55:20 -0400 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-05-02 23:11:07 +1000 |
commit | befbff31b73d5373b5933a3762a3a3c6e871e8da (patch) | |
tree | ae77c9c47ec9f7fbc9045c5fbc288e00377a41d1 /py/repl.c | |
parent | 1f1a54d0b1371efcfec6ca1b03d21b07a908c70d (diff) |
py/repl: Enter four spaces when there are no matches.
Originally at adafruit#1859
Signed-off-by: scottbelden <scottabelden@gmail.com>
Diffstat (limited to 'py/repl.c')
-rw-r--r-- | py/repl.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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) { |