summaryrefslogtreecommitdiff
path: root/py/repl.c
diff options
context:
space:
mode:
authorscottbelden <scottabelden@gmail.com>2019-05-07 13:55:20 -0400
committerscottbelden <scottabelden@gmail.com>2019-05-07 13:55:20 -0400
commit786cb40073dca41ae510093375e84ba41b7e9fb5 (patch)
treedc3528a0f6533a9e487973fca1794623866f2409 /py/repl.c
parent4e0c18ee1f4e53e6b812ec15c00bfbbc71040c1e (diff)
enter four spaces when there are no matches
Diffstat (limited to 'py/repl.c')
-rw-r--r--py/repl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/repl.c b/py/repl.c
index da0fefb3a..66355adff 100644
--- a/py/repl.c
+++ b/py/repl.c
@@ -210,6 +210,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) {