void (@Nullable Editor editor, boolean animated) { if (editor == null) return; if (!animated) editor.getScrollingModel().disableAnimation(); editor.getScrollingModel().scrollToCaret(ScrollType.CENTER); if (!animated) editor.getScrollingModel().enableAnimation(); }