mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 18:54:59 +00:00
make sure diffs display with newlines
This commit is contained in:
parent
6b2024a58a
commit
3393f560fb
2 changed files with 12 additions and 2 deletions
|
@ -44,7 +44,7 @@ class WholeFileCoder(Coder):
|
|||
full_path = (Path(self.root) / fname).absolute()
|
||||
|
||||
if mode == "diff" and full_path.exists():
|
||||
orig_lines = full_path.read_text().splitlines()
|
||||
orig_lines = full_path.read_text().splitlines(keepends=True)
|
||||
|
||||
show_diff = diffs.diff_partial_update(
|
||||
orig_lines,
|
||||
|
@ -97,7 +97,7 @@ class WholeFileCoder(Coder):
|
|||
full_path = (Path(self.root) / fname).absolute()
|
||||
|
||||
if mode == "diff" and full_path.exists():
|
||||
orig_lines = full_path.read_text().splitlines()
|
||||
orig_lines = full_path.read_text().splitlines(keepends=True)
|
||||
|
||||
show_diff = diffs.diff_partial_update(
|
||||
orig_lines,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue