From 1c548574225c773b96d30f2ce757a9a2d70eb112 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 14 Apr 2025 15:29:46 -0700 Subject: [PATCH] fix: Improve handling of interleaved +/- lines in patch parsing --- aider/coders/patch_flex_coder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/coders/patch_flex_coder.py b/aider/coders/patch_flex_coder.py index c134200bc..488f6436e 100644 --- a/aider/coders/patch_flex_coder.py +++ b/aider/coders/patch_flex_coder.py @@ -163,8 +163,8 @@ def _peek_change_hunk( context_after.append(line_content) mode = "context_after" elif line_type == "delete": - # This implies interleaved +/- lines which this simplified parser doesn't handle well. - # Treat as end of hunk? Or raise error? Let's treat as end for now. + # Interleaved +/- lines are not handled well by this simplified parser. + # Treat as end of hunk for now. index = current_line_index # Put the delete line back for the next hunk break else: