mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-10 02:25:25 +02:00
Bug 414694. Don't need to format changes when they only delete code.
This commit is contained in:
parent
4bf5b9a3d8
commit
14343892d3
1 changed files with 4 additions and 3 deletions
|
@ -80,10 +80,11 @@ public class ChangeFormatter {
|
|||
regions[numRegions] = new Region(newOffset, newEnd - newOffset);
|
||||
numRegions++;
|
||||
}
|
||||
|
||||
if (numRegions < regions.length) {
|
||||
|
||||
if (numRegions == 0)
|
||||
return rootEdit;
|
||||
if (numRegions < regions.length)
|
||||
regions = Arrays.copyOf(regions, numRegions);
|
||||
}
|
||||
|
||||
// Calculate formatting changes for the regions after the refactoring changes.
|
||||
ICProject project = tu.getCProject();
|
||||
|
|
Loading…
Add table
Reference in a new issue