diff --git a/aider/commands.py b/aider/commands.py index c1958ac79..4b47b3927 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -586,7 +586,7 @@ class Commands: text = document.text_before_cursor # Skip the first word and the space after it - after_command = " ".join(text.split()[1:]) + after_command = text.split()[-1] # Create a new Document object with the text after the command new_document = Document(after_command, cursor_position=len(after_command))