From 387441b48a0dda7f39e5467bbdc656dfe3b82677 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 21 Aug 2024 09:33:16 -0700 Subject: [PATCH] style: remove backticks from filename autocomplete --- aider/io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/io.py b/aider/io.py index f4e3c2eb2..ebdb7492c 100644 --- a/aider/io.py +++ b/aider/io.py @@ -113,7 +113,7 @@ class AutoCompleter(Completer): candidates = self.words candidates.update(set(self.fname_to_rel_fnames)) - candidates = [(word, f"`{word}`") for word in candidates] + candidates = [(word, f"`{word}`" if word not in self.fname_to_rel_fnames else word) for word in candidates] last_word = words[-1] for word_match, word_insert in candidates: @@ -122,7 +122,7 @@ class AutoCompleter(Completer): if rel_fnames: for rel_fname in rel_fnames: yield Completion( - f"`{rel_fname}`", start_position=-len(last_word), display=rel_fname + rel_fname, start_position=-len(last_word), display=rel_fname ) else: yield Completion(