Skip to content

Commit

Permalink
py/repl: Enter four spaces when there are no matches.
Browse files Browse the repository at this point in the history
Originally at adafruit#1859

Signed-off-by: scottbelden <scottabelden@gmail.com>
  • Loading branch information
scottbelden authored and dpgeorge committed May 2, 2021
1 parent 1f1a54d commit befbff3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions py/repl.c
Expand Up @@ -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) {
Expand Down

0 comments on commit befbff3

Please sign in to comment.