void (int startLine1, int startLine2, int endLine1, int endLine2) { // The slave-side line matching might be incomplete for non-fair line fragments (@see FairDiffIterable) // If it ever became an issue, it could be fixed by explicit fair by-line comparing of "equal" regions int lines1 = endLine1 - startLine1; int lines2 = endLine2 - startLine2; if (myMasterSide.select(lines1, lines2) >= 0) { int startOffset = myMasterSide.isLeft() ? myDocument1.getLineStartOffset(startLine1) : myDocument2.getLineStartOffset(startLine2); int endOffset = myMasterSide.isLeft() ? myDocument1.getLineEndOffset(endLine1) : myDocument2.getLineEndOffset(endLine2); appendText(myMasterSide, startOffset, endOffset, lines1, lines2, startLine1, startLine2); } }