mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-135620 Typing with a lot of carets (hundreds) is extremely slow
some 'cheap' improvements
This commit is contained in:
@@ -493,7 +493,7 @@ public class CaretImpl extends UserDataHolderBase implements Caret, Dumpable {
|
||||
}
|
||||
}
|
||||
|
||||
myEditor.getFoldingModel().flushCaretPosition();
|
||||
myEditor.getFoldingModel().flushCaretPosition(this);
|
||||
|
||||
VerticalInfo oldInfo = myCaretInfo;
|
||||
LogicalPosition oldCaretPosition = myLogicalCaret;
|
||||
@@ -682,7 +682,7 @@ public class CaretImpl extends UserDataHolderBase implements Caret, Dumpable {
|
||||
|
||||
updateVisualLineInfo();
|
||||
|
||||
myEditor.getFoldingModel().flushCaretPosition();
|
||||
myEditor.getFoldingModel().flushCaretPosition(this);
|
||||
|
||||
setLastColumnNumber(myLogicalCaret.column);
|
||||
myDesiredSelectionStartColumn = myDesiredSelectionEndColumn = -1;
|
||||
@@ -872,7 +872,6 @@ public class CaretImpl extends UserDataHolderBase implements Caret, Dumpable {
|
||||
}
|
||||
}
|
||||
|
||||
updateVisualLineInfo();
|
||||
updateSelectionOnDocumentChange();
|
||||
}
|
||||
|
||||
|
||||
@@ -523,10 +523,8 @@ public class FoldingModelImpl implements FoldingModelEx, PrioritizedInternalDocu
|
||||
return myFoldTextAttributes;
|
||||
}
|
||||
|
||||
public void flushCaretPosition() {
|
||||
for (Caret caret : myEditor.getCaretModel().getAllCarets()) {
|
||||
caret.putUserData(SAVED_CARET_POSITION, null);
|
||||
}
|
||||
void flushCaretPosition(@NotNull Caret caret) {
|
||||
caret.putUserData(SAVED_CARET_POSITION, null);
|
||||
}
|
||||
|
||||
void onBulkDocumentUpdateStarted() {
|
||||
|
||||
Reference in New Issue
Block a user