Fix move detection for the last line in an insert group.

Review Request #5542 — Created Feb. 24, 2014 and submitted

Information

Review Board
release-2.0.x
7e58e8b...

Reviewers

The move detection introduced an off-by-one where the last line in a
chunk wasn't being processed as a move unless the line after the chunk
had content. That last line should never have been processed either
in the first place, but we were just looping too hard.

We now loop only through the lines in the chunk, and if we've hit the
line and have any move ranges calculated, we process them.

Saw this initially with a diff containing a single line I expected would
have been marked as a move. After this change, it was properly marked.

Unit tests pass. The new test failed without the fix.

chipx86
david
  1. Ship It!

  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Loading...