From 881868bf17e22b3d9d2370ca13457ca8d2c99c2d Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 12 Mar 2025 12:49:57 -0700 Subject: [PATCH] refactor: Require 3 characters for autocomplete, except for commands --- aider/io.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aider/io.py b/aider/io.py index d328b6bb3..5c0944b8f 100644 --- a/aider/io.py +++ b/aider/io.py @@ -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()):