void (@NotNull AnActionEvent e) { Side currentSide = getCurrentSide(); Side targetSide = currentSide.other(); EditorEx currentEditor = getEditor(currentSide); EditorEx targetEditor = getEditor(targetSide); if (myScrollToPosition) { LineCol position = transferPosition(currentSide, LineCol.fromCaret(currentEditor)); targetEditor.getCaretModel().moveToOffset(position.toOffset(targetEditor)); } setCurrentSide(targetSide); targetEditor.getScrollingModel().scrollToCaret(ScrollType.MAKE_VISIBLE); DiffUtil.requestFocus(getProject(), getPreferredFocusedComponent()); }