diff --git a/aider/coders/editblock_coder.py b/aider/coders/editblock_coder.py index 2c9706a74..c64902a61 100644 --- a/aider/coders/editblock_coder.py +++ b/aider/coders/editblock_coder.py @@ -102,6 +102,7 @@ def replace_most_similar_chunk(whole, part, replace): except ValueError: pass + return # Try fuzzy matching res = replace_closest_edit_distance(whole_lines, part, part_lines, replace_lines) if res: diff --git a/aider/coders/editblock_prompts.py b/aider/coders/editblock_prompts.py index 05f26b2a8..7f0e7eb51 100644 --- a/aider/coders/editblock_prompts.py +++ b/aider/coders/editblock_prompts.py @@ -36,7 +36,7 @@ Every *edit block* must be fenced with {fence[0]}...{fence[1]} with the correct Every *edit block* must start with the full path! *NEVER* propose edit blocks for *read-only* files. The ORIGINAL section must be an *exact set of sequential lines* from the file: - NEVER SKIP LINES! -- Include all original leading spaces and indentation! +- NEVER SKIP LEADING WHITESPACE FROM LINES! Edits to different parts of a file each need their own *edit block*.