mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
performance optimization (following IDEA-CR-337)
This commit is contained in:
+6
-2
@@ -601,7 +601,9 @@ public class EditorActionUtil {
|
||||
}
|
||||
}
|
||||
caretModel.moveToOffset(newOffset);
|
||||
editor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE);
|
||||
if (editor.getCaretModel().getCurrentCaret() == editor.getCaretModel().getPrimaryCaret()) {
|
||||
editor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE);
|
||||
}
|
||||
|
||||
setupSelection(editor, isWithSelection, selectionStart, blockSelectionStart);
|
||||
}
|
||||
@@ -673,7 +675,9 @@ public class EditorActionUtil {
|
||||
if (isWordStart(text, newOffset, camel)) break;
|
||||
}
|
||||
editor.getCaretModel().moveToOffset(newOffset);
|
||||
editor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE);
|
||||
if (editor.getCaretModel().getCurrentCaret() == editor.getCaretModel().getPrimaryCaret()) {
|
||||
editor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE);
|
||||
}
|
||||
|
||||
setupSelection(editor, isWithSelection, selectionStart, blockSelectionStart);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user