diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/CaretModelImpl.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/CaretModelImpl.java index 708969c3d9b3..a1831eaa4810 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/CaretModelImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/CaretModelImpl.java @@ -348,7 +348,7 @@ public class CaretModelImpl implements CaretModel, PrioritizedDocumentListener, public void runForEachCaret(@NotNull final CaretAction action, final boolean reverseOrder) { EditorImpl.assertIsDispatchThread(); if (myCurrentCaret != null) { - throw new IllegalStateException("Current caret is defined, cannot operate on other ones"); + throw new IllegalStateException("Recursive runForEachCaret invocations are not allowed"); } doWithCaretMerging(() -> { try {