UnifiedDiffChange () { List<UnifiedDiffChange> changes = myModel.getDiffChanges(); if (changes == null) return null; int caretLine = myEditor.getCaretModel().getLogicalPosition().line; for (UnifiedDiffChange change : changes) { if (DiffUtil.isSelectedByLine(caretLine, change.getLine1(), change.getLine2())) return change; } return null; }