Skip to content

Commit e9eeada

Browse files
scottbeldentyomitch
authored andcommitted
repl: Enter four spaces when there are no matches.
Originally at adafruit#1859 Signed-off-by: scottbelden <[email protected]>
1 parent 15632f5 commit e9eeada

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
@@ -228,6 +228,10 @@ size_t mp_repl_autocomplete(const char *str, size_t len, const mp_print_t *print
228228

229229
// nothing found
230230
if (q_first == 0) {
231+
if (s_len == 0) {
232+
*compl_str = " ";
233+
return 4;
234+
}
231235
// If there're no better alternatives, and if it's first word
232236
// in the line, try to complete "import".
233237
if (s_start == org_str) {

0 commit comments

Comments
 (0)