Prevent diff viewer from marking existing code that has been moved as new ("inserted")
I'd like to see an update to the diff viewer where it somehow marks moved - but otherwise unchanged - code as "unchanged", or "unchanged but moved." This would be only for code moved within the same scope.
This seems to happen with cut and pasted code. When I cut and paste code, its original position is marked "changed" (blue). The place where I paste it is marked "inserted" (green). This leads me to believe that this code did not previously exist in the branch, which is not at all true and makes the diff ambiguous. (I suppose I did technically insert that code, but green generally means "new" to me, and I'm sure to a lot of other people.)
So when I come across that green block of code that I didn't change but only moved, I have to do a double-take to figure out if it's actually new or simply in a new position.
Some sort of signifier for moved code would make the diffs more transparent. Maybe a new color or some unobtrusive text. But in any case, marking existing code as "new" muddles an otherwise excellent tool.
Please sign in to leave a comment.
Hello @...
There is a feature request about such diff, please see and feel free to vote:
https://youtrack.jetbrains.com/issue/IDEA-253529