void (EditorEx editor, Random random) { DocumentEx document = editor.getDocument(); if (document.isInBulkUpdate()) return; editor.getCaretModel().moveToOffset(random.nextInt(document.getTextLength() + 1)); }