Skip to content

Commit bec84f2

Browse files
authored
Merge pull request adafruit#1859 from scottbelden/tabbing
enter four spaces when there are no matches
2 parents 9ba8191 + 786cb40 commit bec84f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

py/repl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ size_t mp_repl_autocomplete(const char *str, size_t len, const mp_print_t *print
215215

216216
// nothing found
217217
if (q_first == 0) {
218+
if (s_len == 0) {
219+
*compl_str = " ";
220+
return 4;
221+
}
218222
// If there're no better alternatives, and if it's first word
219223
// in the line, try to complete "import".
220224
if (s_start == org_str) {

0 commit comments

Comments
 (0)