int (@NotNull Editor editor1, @NotNull Editor editor2, int startLine1, int startLine2, @NotNull TextDiffType type) { int visualStartLine1 = EditorUtil.logicalToVisualLine(editor1, startLine1); int visualStartLine2 = EditorUtil.logicalToVisualLine(editor2, startLine2); if (type == TextDiffType.INSERTED) { return EditorUtil.getInlaysHeight(editor2, visualStartLine2, true); } if (type == TextDiffType.DELETED) { return EditorUtil.getInlaysHeight(editor1, visualStartLine1, true); } if (type == TextDiffType.MODIFIED) { return Math.max(EditorUtil.getInlaysHeight(editor1, visualStartLine1, true), EditorUtil.getInlaysHeight(editor2, visualStartLine2, true)); } return 0; }