Fix move detection for the last line in an insert group.
Review Request #5542 — Created Feb. 24, 2014 and submitted — Latest diff uploaded
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.