assertReadAccess instead of dispatch thread

This commit is contained in:
Alexey Kudravtsev
2012-04-03 14:11:29 +04:00
parent 3cb06cb9b1
commit 0f560bfd7d
@@ -3317,7 +3317,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
@Override
public int logicalPositionToOffset(@NotNull LogicalPosition pos) {
assertIsDispatchThread();
assertReadAccess();
if (myDocument.getLineCount() == 0) return 0;
if (pos.line < 0) throw new IndexOutOfBoundsException("Wrong line: " + pos.line);