ThreesideDiffChangeBase (@NotNull ThreeSide side) { int caretLine = getEditor(side).getCaretModel().getLogicalPosition().line; for (ThreesideDiffChangeBase change : getChanges()) { int line1 = change.getStartLine(side); int line2 = change.getEndLine(side); if (DiffUtil.isSelectedByLine(caretLine, line1, line2)) return change; } return null; }