mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 250969 - Code Formatter removes necessary whitespaces
This commit is contained in:
parent
2dd772835a
commit
f9a7cd90e1
2 changed files with 21 additions and 1 deletions
|
@ -1708,6 +1708,7 @@ public class Scribe {
|
||||||
fSkippedIndentations++;
|
fSkippedIndentations++;
|
||||||
}
|
}
|
||||||
if (offset > currentPosition) {
|
if (offset > currentPosition) {
|
||||||
|
space();
|
||||||
printRaw(currentPosition, offset - currentPosition);
|
printRaw(currentPosition, offset - currentPosition);
|
||||||
scanner.resetTo(offset, scannerEndPosition - 1);
|
scanner.resetTo(offset, scannerEndPosition - 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -852,5 +852,24 @@ public class CodeFormatterTest extends BaseUITestCase {
|
||||||
public void testPreserveSpaceBetweenPointerModifierAndIdentifier_Bug243056() throws Exception {
|
public void testPreserveSpaceBetweenPointerModifierAndIdentifier_Bug243056() throws Exception {
|
||||||
assertFormatterResult();
|
assertFormatterResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//#define FUNCTION_NAME myFunc
|
||||||
|
//#define VARIABLE_NAME myVar
|
||||||
|
//
|
||||||
|
//void FUNCTION_NAME( void );
|
||||||
|
//void FUNCTION_NAME( void )
|
||||||
|
//{
|
||||||
|
//int VARIABLE_NAME;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//#define FUNCTION_NAME myFunc
|
||||||
|
//#define VARIABLE_NAME myVar
|
||||||
|
//
|
||||||
|
//void FUNCTION_NAME(void);
|
||||||
|
//void FUNCTION_NAME(void) {
|
||||||
|
// int VARIABLE_NAME;
|
||||||
|
//}
|
||||||
|
public void testPreserveNecessarySpace_Bug250969() throws Exception {
|
||||||
|
assertFormatterResult();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue