mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
refactor: Require 3 characters for autocomplete, except for commands
This commit is contained in:
parent
e90eb39a9b
commit
881868bf17
1 changed files with 5 additions and 0 deletions
|
@ -194,6 +194,11 @@ class AutoCompleter(Completer):
|
|||
candidates = [word if type(word) is tuple else (word, word) for word in candidates]
|
||||
|
||||
last_word = words[-1]
|
||||
|
||||
# Only provide completions if the user has typed at least 3 characters
|
||||
if len(last_word) < 3:
|
||||
return
|
||||
|
||||
completions = []
|
||||
for word_match, word_insert in candidates:
|
||||
if word_match.lower().startswith(last_word.lower()):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue