@@ -367,38 +367,16 @@ fn process_change(
367367 ( true , false ) => {
368368 // <--------> (hunk)
369369 // <-------> (unchanged)
370- // <----> (new hunk)
371- // <--> (new hunk)
372-
373- if unchanged. start > hunk. range_in_destination . start {
374- let line_range_in_next_destination = LineRange :: with_offset (
375- hunk. range_in_destination . start ..unchanged. start ,
376- * offset_in_destination,
377- ) ;
378-
379- new_hunks_to_blame. push ( UnblamedHunk :: from_destination (
380- line_range_in_next_destination. into ( ) ,
381- hunk. offset ( ) + * offset_in_destination,
382- ) ) ;
383- }
384370
385371 let line_range_in_next_destination =
386- LineRange :: with_offset ( unchanged . start .. hunk. range_in_destination . end , * offset_in_destination) ;
372+ LineRange :: with_offset ( hunk. range_in_destination . clone ( ) , * offset_in_destination) ;
387373
388374 new_hunks_to_blame. push ( UnblamedHunk :: from_destination (
389375 line_range_in_next_destination. into ( ) ,
390376 hunk. offset ( ) + * offset_in_destination,
391377 ) ) ;
392378
393- let new_change = if unchanged. end > hunk. range_in_destination . end {
394- let line_range = hunk. range_in_destination . end ..unchanged. end ;
395-
396- Some ( Change :: Unchanged ( line_range) )
397- } else {
398- todo ! ( ) ;
399- } ;
400-
401- ( None , new_change)
379+ ( None , Some ( Change :: Unchanged ( unchanged) ) )
402380 }
403381 ( false , false ) => {
404382 if unchanged. end <= hunk. range_in_destination . start {
@@ -1761,7 +1739,7 @@ fn process_change_works_enclosing_unchanged_lines() {
17611739 ) ;
17621740
17631741 assert_eq ! ( hunk, None ) ;
1764- assert_eq ! ( change, Some ( Change :: Unchanged ( 113 ..172 ) ) ) ;
1742+ assert_eq ! ( change, Some ( Change :: Unchanged ( 109 ..172 ) ) ) ;
17651743 assert_eq ! ( lines_blamed, vec![ ] ) ;
17661744 assert_eq ! (
17671745 new_hunks_to_blame,
@@ -1819,7 +1797,7 @@ fn process_change_works_unchanged_hunk_2() {
18191797 ) ;
18201798
18211799 assert_eq ! ( hunk, None ) ;
1822- assert_eq ! ( change, Some ( Change :: Unchanged ( 5 ..7 ) ) ) ;
1800+ assert_eq ! ( change, Some ( Change :: Unchanged ( 0 ..7 ) ) ) ;
18231801 assert_eq ! ( lines_blamed, vec![ ] ) ;
18241802 assert_eq ! (
18251803 new_hunks_to_blame,
0 commit comments