mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
include foo in completions as well as path/to/foo matches
This commit is contained in:
parent
f6b50fa4c6
commit
dea8c0960b
1 changed files with 2 additions and 4 deletions
|
@ -150,15 +150,13 @@ class AutoCompleter(Completer):
|
|||
for word_match, word_insert in candidates:
|
||||
if word_match.lower().startswith(last_word.lower()):
|
||||
rel_fnames = self.fname_to_rel_fnames.get(word_match, [])
|
||||
yield Completion(word_insert, start_position=-len(last_word), display=word_match)
|
||||
|
||||
if rel_fnames:
|
||||
for rel_fname in rel_fnames:
|
||||
yield Completion(
|
||||
rel_fname, start_position=-len(last_word), display=rel_fname
|
||||
)
|
||||
else:
|
||||
yield Completion(
|
||||
word_insert, start_position=-len(last_word), display=word_match
|
||||
)
|
||||
|
||||
|
||||
class InputOutput:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue