diff --git a/spyder/widgets/mixins.py b/spyder/widgets/mixins.py index ee968ec2295..5b537a0f623 100644 --- a/spyder/widgets/mixins.py +++ b/spyder/widgets/mixins.py @@ -1083,7 +1083,7 @@ def is_special_character(move): startpos = cursor.selectionStart() # Find a valid Python variable name - if valid_python_variable: + if valid_python_variable and not completion: match = re.findall(r'([^\d\W]\w*)', text, re.UNICODE) if not match: # This is assumed in several places of our codebase,