1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-10 10:35:23 +02:00

Bug 414694. Don't need to format changes when they only delete code.

This commit is contained in:
Sergey Prigogin 2013-08-24 18:03:43 -07:00
parent 4bf5b9a3d8
commit 14343892d3

View file

@ -80,10 +80,11 @@ public class ChangeFormatter {
regions[numRegions] = new Region(newOffset, newEnd - newOffset); regions[numRegions] = new Region(newOffset, newEnd - newOffset);
numRegions++; numRegions++;
} }
if (numRegions < regions.length) { if (numRegions == 0)
return rootEdit;
if (numRegions < regions.length)
regions = Arrays.copyOf(regions, numRegions); regions = Arrays.copyOf(regions, numRegions);
}
// Calculate formatting changes for the regions after the refactoring changes. // Calculate formatting changes for the regions after the refactoring changes.
ICProject project = tu.getCProject(); ICProject project = tu.getCProject();