Skip to content

Commit 18b1ebd

Browse files
committed
fix: hunks overlap
(cherry picked from commit b367d53)
1 parent 67a1c80 commit 18b1ebd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diff/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ fn to_hunks<'a, T: ?Sized>(
235235
// Check to see if we can merge the hunks
236236
let start1_next =
237237
cmp::min(s.old.start, lines1.len() - 1).saturating_sub(context_len);
238-
if start1_next < end1 {
238+
if start1_next <= end1 {
239239
// Context lines between hunks
240240
for (_i1, i2) in (script.old.end..s.old.start).zip(script.new.end..s.new.start)
241241
{

0 commit comments

Comments
 (0)