aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacek Pospychala2012-11-05 04:26:48 (EST)
committerJacek Pospychala2012-11-05 12:06:37 (EST)
commit72d226e8239a3e4fb7c4f735bc5d4f96a538c502 (patch)
tree1b7ce110901990da5e9ced15cd8f3434a61e9bf9
parentf310c37bc2fce272cf9c85452c8436eabfea1a2e (diff)
downloadorg.eclipse.pdt-72d226e8239a3e4fb7c4f735bc5d4f96a538c502.zip
org.eclipse.pdt-72d226e8239a3e4fb7c4f735bc5d4f96a538c502.tar.gz
org.eclipse.pdt-72d226e8239a3e4fb7c4f735bc5d4f96a538c502.tar.bz2
Bug 386550 - Incorrect array indentation cases
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/format/DefaultIndentationStrategy.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/format/DefaultIndentationStrategy.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/format/DefaultIndentationStrategy.java
index e558f35..0958c9f 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/format/DefaultIndentationStrategy.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/format/DefaultIndentationStrategy.java
@@ -613,7 +613,7 @@ public class DefaultIndentationStrategy implements IIndentationStrategy {
final int newForOffset;
// code for not formatting comments
- if (lineText.trim().startsWith("//")) {
+ if (lineText.trim().startsWith("//") && enterKeyPressed) {
lastNonEmptyLineIndex = lineOfOffset;
indentationBaseLineIndex = lineOfOffset;
int i = lineInformationOfOffset.getOffset();
@@ -622,7 +622,7 @@ public class DefaultIndentationStrategy implements IIndentationStrategy {
&& document.getChar(i) != '/'; i++)
;
newForOffset = (forOffset < i) ? i : forOffset;
-
+
}
// end
else {