summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--py/repl.c2
-rw-r--r--tests/cmdline/repl_autocomplete.py2
-rw-r--r--tests/cmdline/repl_autocomplete.py.exp3
3 files changed, 4 insertions, 3 deletions
diff --git a/py/repl.c b/py/repl.c
index bb172d7a0..699ef10a6 100644
--- a/py/repl.c
+++ b/py/repl.c
@@ -189,7 +189,7 @@ size_t mp_repl_autocomplete(const char *str, size_t len, const mp_print_t *print
if (dest[0] != MP_OBJ_NULL) {
// special case; filter out words that begin with underscore
// unless there's already a partial match
- if (s_len == 0 && *d_str == '_') {
+ if (s_len == 0 && d_str[0] == '_') {
continue;
}
if (match_str == NULL) {
diff --git a/tests/cmdline/repl_autocomplete.py b/tests/cmdline/repl_autocomplete.py
index fe8e8fc51..43c49cdc2 100644
--- a/tests/cmdline/repl_autocomplete.py
+++ b/tests/cmdline/repl_autocomplete.py
@@ -7,6 +7,6 @@ x = '123'
i = str
i.lowe ('ABC')
x = 5
-x.
+x. 
x._
None. 
diff --git a/tests/cmdline/repl_autocomplete.py.exp b/tests/cmdline/repl_autocomplete.py.exp
index 3e5fedccb..7d160e7bf 100644
--- a/tests/cmdline/repl_autocomplete.py.exp
+++ b/tests/cmdline/repl_autocomplete.py.exp
@@ -12,7 +12,8 @@ Use \.\+
'abc'
>>> x = 5
>>> x.
-from_bytes to_bytes
+from_bytes to_bytes
+>>> x.
>>> x.__class__
<class 'int'>
>>> None.