mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-06 04: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,
|
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
|
# Iterate over the completions and modify them
|
||||||
for completion in path_completer.get_completions(new_document, complete_event):
|
for completion in path_completer.get_completions(new_document, complete_event):
|
||||||
quoted_text = self.quote_fname(completion.text)
|
quoted_text = self.quote_fname(completion.text)
|
||||||
yield Completion(
|
yield Completion(
|
||||||
text=quoted_text,
|
text=quoted_text,
|
||||||
start_position=completion.start_position,
|
start_position=adjusted_start_position,
|
||||||
display=completion.display,
|
display=completion.display,
|
||||||
style=completion.style,
|
style=completion.style,
|
||||||
selected_style=completion.selected_style,
|
selected_style=completion.selected_style,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue