Commit 2af28891 authored by Dmitry Batrak's avatar Dmitry Batrak
Browse files

speed up opening of editor containing a lot of carets

parent 7c9d45df
Branches unavailable Tags unavailable
Showing with 1 addition and 3 deletions
+1 -3
......@@ -909,9 +909,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
myCaretModel.updateVisualPosition();
// make sure carets won't appear at invalid positions (e.g. on Tab width change)
for (Caret caret : getCaretModel().getAllCarets()) {
caret.moveToOffset(caret.getOffset());
}
getCaretModel().doWithCaretMerging(() -> myCaretModel.getAllCarets().forEach(caret -> caret.moveToOffset(caret.getOffset())));
if (myVirtualFile != null && myProject != null) {
final EditorNotifications editorNotifications = EditorNotifications.getInstance(myProject);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment