mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix for 206829: Can't create a newline in some cpp files
This commit is contained in:
parent
57d7ac7888
commit
f9aaf04e88
1 changed files with 4 additions and 8 deletions
|
@ -664,15 +664,9 @@ public final class CIndenter {
|
|||
if (CCorePlugin.SPACE.equals(fPrefs.prefTabChar)) {
|
||||
tabs= 0;
|
||||
spaces= missing;
|
||||
} else if (CCorePlugin.TAB.equals(fPrefs.prefTabChar)) {
|
||||
tabs= tabSize > 0 ? missing / tabSize : 0;
|
||||
spaces= tabSize > 0 ? missing % tabSize : missing;
|
||||
} else if (DefaultCodeFormatterConstants.MIXED.equals(fPrefs.prefTabChar)) {
|
||||
tabs= tabSize > 0 ? missing / tabSize : 0;
|
||||
spaces= tabSize > 0 ? missing % tabSize : missing;
|
||||
} else {
|
||||
Assert.isTrue(false);
|
||||
return null;
|
||||
tabs= tabSize > 0 ? missing / tabSize : 0;
|
||||
spaces= tabSize > 0 ? missing % tabSize : missing;
|
||||
}
|
||||
for (int i= 0; i < tabs; i++)
|
||||
buffer.append('\t');
|
||||
|
@ -1408,6 +1402,7 @@ public final class CIndenter {
|
|||
return false;
|
||||
|
||||
default:
|
||||
// programming error
|
||||
Assert.isTrue(false);
|
||||
return false;
|
||||
}
|
||||
|
@ -1538,6 +1533,7 @@ public final class CIndenter {
|
|||
return pos; // restore
|
||||
|
||||
default:
|
||||
// programming error
|
||||
Assert.isTrue(false);
|
||||
return -1; // dummy
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue