boolean (@NotNull Editor editor) { return editor.getSelectionModel().getSelectionStart() < editor.getSelectionModel().getSelectionEnd() || FoldingUtil.getFoldRegionsAtOffset(editor, editor.getCaretModel().getOffset()).length > 0; }