- Change Summary:
-
Fixed a comment.
- Commit:
-
0f3b88befec33e96f92b7a8e14c6cf2d287cb9037e58e8b55cce61d4c1c767898b01f707c62cf0f2
Fix move detection for the last line in an insert group.
Review Request #5542 — Created Feb. 24, 2014 and submitted
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.