fixed PY-6889 Incorrect indent on pasting class method on module-level right after the class itself

This commit is contained in:
Ekaterina Tuzova
2012-07-11 20:58:53 +04:00
parent b196169c7f
commit 240c4c00cd
@@ -163,6 +163,9 @@ public class CopyPasteIndentProcessor implements CopyPastePostProcessor<IndentTr
if (!StringUtil.isEmptyOrSpaces(s) && firstIndent > 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());