mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
fix: adjust start_position for quoted filename completions in completions_raw_read_only method
This commit is contained in:
parent
eef97e4938
commit
87da3a7132
1 changed files with 4 additions and 1 deletions
|
@ -608,12 +608,15 @@ class Commands:
|
|||
expanduser=True,
|
||||
)
|
||||
|
||||
# Adjust the start_position to replace all of 'after_command'
|
||||
adjusted_start_position = -len(after_command)
|
||||
|
||||
# Iterate over the completions and modify them
|
||||
for completion in path_completer.get_completions(new_document, complete_event):
|
||||
quoted_text = self.quote_fname(completion.text)
|
||||
yield Completion(
|
||||
text=quoted_text,
|
||||
start_position=completion.start_position,
|
||||
start_position=adjusted_start_position,
|
||||
display=completion.display,
|
||||
style=completion.style,
|
||||
selected_style=completion.selected_style,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue