void (@NotNull Editor editor, @NotNull FocusEvent event) { if (!Registry.is("ide.autoscroll.from.source.on.focus.gained")) return; if (!myAutoScrollOnFocusEditor.getAndSet(true)) return; if (isAutoscrollFromSource(getCurrentViewId())) { autoScrollFromSourceHandler.addRequest(() -> { // ensure that it is still enabled after a while if (isAutoscrollFromSource(getCurrentViewId())) { if (findFileEditor(editor) != null) { SelectInProjectViewImplKt.getLOG().debug("Invoking scroll from source because the editor has gained focus"); autoScrollFromSourceHandler.scrollFromSource(); } } }); } }