IJPL-165323 Use ReadAction in EditorAccessibilityCaret's getMark and getDot methods

(cherry picked from commit 58dd6e4a4abaab755b29e01b5b126e466d4646e7)

IJ-CR-150010

GitOrigin-RevId: f939ba6a8935864bcca744bdb257c5cb2b2ed402
This commit is contained in:
Dmitry Drobotov
2024-10-28 18:14:47 +01:00
committed by intellij-monorepo-bot
parent 43c51f2955
commit 45074b3937

View File

@@ -1078,12 +1078,12 @@ public final class EditorComponentImpl extends JTextComponent implements Scrolla
@Override
public int getDot() {
return editor.getCaretModel().getOffset();
return ReadAction.compute(() -> editor.getCaretModel().getOffset());
}
@Override
public int getMark() {
return editor.getSelectionModel().getSelectionStart();
return ReadAction.compute(() -> editor.getSelectionModel().getSelectionStart());
}
@Override