Patch to detect moved lines, and not highlight them.
This isn't meant to be the final polished version so
much as a demonstration of the feasibility, because I'm
not sure about handling coloring.
This finds individual lines that moved, for clear
instances (that is, when one line on the left matches
only one line on the right, etc).
I returned moved lines arrays to the diff wrapper
(gives matching line numbers for moved lines), and
added a new line flags (LF_MOVED), and altered the
paint code to use ghost background for lines with
LF_DIFF and LF_MOVED, which deemphasizes them. I don't
have the detail paint code working properly.
It might be nicer to recognize entire moved blocks --
at the block level I mean -- also, when say 90% plus of
the left & right block match. I'm not sure if that is
feasible, but if so so, the whole block could then
optionally be removed from the difference list, which
would be nice (ie, the ability to screen out moved
differences from the difference list).
Log in to post a comment.