boolean (@NotNull Editor editor) { return ReadAction.compute(() -> { CaretModel caretModel = editor.getCaretModel(); if (caretModel.getCaretCount() >= caretModel.getMaxCaretCount()) { notifyMaxCarets(editor); return true; } return false; }); }