From d7d596e7c77ed19a00bfb2c69a006d26a75bbc9f Mon Sep 17 00:00:00 2001 From: Max Medvedev Date: Tue, 10 Jun 2014 16:21:52 +0400 Subject: [PATCH] Groovy: Remove extra spaces after deleted statements. So no extra line feed in Introduce Variable appears --- .../org/jetbrains/plugins/groovy/lang/psi/impl/PsiImplUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/PsiImplUtil.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/PsiImplUtil.java index ddacf2c18903..0cde75af230b 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/PsiImplUtil.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/PsiImplUtil.java @@ -522,7 +522,7 @@ public class PsiImplUtil { while (next != null) { final ASTNode node = next.getNode(); final IElementType type = node.getElementType(); - if (type == GroovyTokenTypes.mSEMI) { + if (type == GroovyTokenTypes.mSEMI || type == TokenType.WHITE_SPACE && !next.getText().contains("\n")) { final PsiElement nnext = next.getNextSibling(); container.deleteChildRange(next, next); next = nnext;