diff --git a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/CopyPasteIndentProcessor.java b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/CopyPasteIndentProcessor.java index 2e9cbd7d2d97..b993d2822fdb 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/CopyPasteIndentProcessor.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/CopyPasteIndentProcessor.java @@ -163,6 +163,9 @@ public class CopyPasteIndentProcessor implements CopyPastePostProcessor currentIndent) return; } + //insert on top level, doesn't need indent + if (caretColumn == 0 && !pastedText.startsWith(" ")) + return; if (textBeforeFirstLine.trim().length() == 0) { EditorActionUtil.indentLine(project, editor, startLine, -value.getFirstLineLeadingSpaces());