Skip to content

Commit

Permalink
fix: offset number of added lines in case of multiple lines
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasrothenberger authored Nov 9, 2023
1 parent 8a11c29 commit 8de3f0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discopop_library/LineMapping/diff_modifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def apply_line_mapping_modifications_from_diff(file_id: int, diff: str):
deleted_lines_count = 1
rhs = diff_entry[diff_entry.index("c") + 1 :]
if "," in rhs:
added_lines_count = int(rhs.split(",")[1]) - int(rhs.split(",")[0])
added_lines_count = int(rhs.split(",")[1]) - int(rhs.split(",")[0]) + 1
else:
added_lines_count = 1

Expand Down

0 comments on commit 8de3f0d

Please sign in to comment.