summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2019-05-08 14:49:11 -0400
committerGitHub <noreply@github.com>2019-05-08 14:49:11 -0400
commitbec84f20abb716c0d8052554d841c1291ddf64cc (patch)
tree8eab943a7ff7251e72a6a6b60f404f4e94e89521
parent9ba8191a0442963f55f0419d38cab81132213fec (diff)
parent786cb40073dca41ae510093375e84ba41b7e9fb5 (diff)
Merge pull request #1859 from scottbelden/tabbing
enter four spaces when there are no matches
-rw-r--r--py/repl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/repl.c b/py/repl.c
index 699ef10a6..aa91c3f12 100644
--- a/py/repl.c
+++ b/py/repl.c
@@ -215,6 +215,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) {