Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Stornelli2019-03-13 13:06:38 -0400
committerMarco Stornelli2019-07-20 04:18:08 -0400
commit04350fec0eb5063051144fa63c116fa7e83adb09 (patch)
tree04777e9d3834e51823d1e2ed081c4782624e8f9a /core/org.eclipse.cdt.core
parente744550278131f5c6ee3cd98a75bd7aa4b9ad399 (diff)
downloadorg.eclipse.cdt-04350fec0eb5063051144fa63c116fa7e83adb09.tar.gz
org.eclipse.cdt-04350fec0eb5063051144fa63c116fa7e83adb09.tar.xz
org.eclipse.cdt-04350fec0eb5063051144fa63c116fa7e83adb09.zip
Bug 376395 - Fix const methods with never join wrapped lines
When at the same time never join wrapped lines and next line for opening function brace were selected, two tabs were added. Change-Id: I90f606bf7f8b7bb7e83f3ae85d7cbb9cd0146b97 Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Diffstat (limited to 'core/org.eclipse.cdt.core')
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CodeFormatterVisitor.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CodeFormatterVisitor.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CodeFormatterVisitor.java
index a50ba70a5b..ffe73d2a7d 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CodeFormatterVisitor.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CodeFormatterVisitor.java
@@ -368,7 +368,8 @@ public class CodeFormatterVisitor extends ASTVisitor implements ICPPASTVisitor,
}
} else {
// Skip the rest (=0)
- if (needSpace && scribe.printComment()) {
+ if (needSpace) {
+ scribe.printTrailingComment();
scribe.space();
}
skipNode(node);

Back to the top