Merge pull request #1859 from scottbelden/tabbing

enter four spaces when there are no matches
This commit is contained in:
Scott Shawcroft 2019-05-08 14:49:11 -04:00 committed by GitHub
commit bec84f20ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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) {