Better autodetect for indentation changes

Post your new features ideas and suggestions here.
CaptainFlint
Posts: 8
Joined: Mon Sep 25, 2006 5:38 pm
Location: Moscow, Russia

Better autodetect for indentation changes

Postby CaptainFlint » Wed Dec 01, 2010 2:16 pm

Quite often I compare some source code file with an earlier version of it, and sometimes it happens that I wrapped some block of code into if/while or, conversely, moved it outside. As a consequence, indentation of such block changes. Unfortunately, Compare It! completely fails to work with such changes and shows the two versions of the block (original and indented) as two absolutely irrelated blocks, like the first is removed, and the second is inserted. Even manual match is not of much help, because it lasts for several lines only, so I have to set numerous manual matches through all the block just to align this pair and see the real differences. So, my suggestion is: adapt the comparison and matching algorithm so that it took into account possible indentations of text blocks and could align them properly.

Of course I know that I can make CI ignore leading blanks. But if I do that, CI completely ignores them, and that's not what I need. I want to know that something has changed in this particular block of code, even if the chage was in indentation only. So now there are only two options currently: either not see the indentation changes at all, or see the indented block as a completely different block of code and be unable to compare it with the previous version (except for the tedious several manual match sets). I'd like to have possibility to have the indented block aligned with its non-indented version without concealing that the indentation took place at all.

grigsoft
Site Admin
Posts: 1671
Joined: Tue Sep 23, 2003 7:37 pm

Re: Better autodetect for indentation changes

Postby grigsoft » Thu Dec 02, 2010 4:14 pm

Well, this does make sense for moved block detection, I will add this to to-do list. Thank you!

brahman
Posts: 180
Joined: Thu Jan 11, 2007 6:18 pm

Re: Better autodetect for indentation changes

Postby brahman » Tue Dec 07, 2010 11:32 am

I think this would be very helpful, happened to me a few times too.


Return to “Compare It! - Suggestions”

Who is online

Users browsing this forum: No registered users and 2 guests