if (prefs.getSmartIndentPar()) {
PySelection selection = new PySelection(document, command.offset);
if (selection.getCursorLineContents().trim().length() > 0) {
command.text = autoIndentNewline(document, command.length, command.text, command.offset).o1;
if (PySelection.containsOnlyWhitespaces(selection.getLineContentsToCursor())) {
command.caretOffset = command.offset + selection.countSpacesAfter(command.offset);
}
}
} else {
PySelection selection = new PySelection(document, command.offset);
if (selection.getLineContentsToCursor().trim().endsWith(":")) {