diff --git a/aider/getinput.py b/aider/getinput.py index 3edb2b2a6..c6945ac09 100644 --- a/aider/getinput.py +++ b/aider/getinput.py @@ -19,7 +19,8 @@ class FileContentCompleter(Completer): for fname in self.fnames: with open(fname, "r") as f: content = f.read() - for word in content.split(): + import re + for word in re.split(r'\W+', content): if word.startswith(last_word): yield Completion(word, start_position=-len(last_word))