void (@NotNull ProperTextRange yPositions) { if (myDirtyYPositions != WHOLE_DOCUMENT) { int start = Math.max(0, yPositions.getStartOffset() - myEditor.getLineHeight()); int end = myEditorScrollbarTop + myEditorTargetHeight == 0 ? yPositions.getEndOffset() + myEditor.getLineHeight() : Math .min(myEditorScrollbarTop + myEditorTargetHeight, yPositions.getEndOffset() + myEditor.getLineHeight()); ProperTextRange adj = new ProperTextRange(start, Math.max(end, start)); myDirtyYPositions = myDirtyYPositions == null ? adj : myDirtyYPositions.union(adj); } myEditorScrollbarTop = 0; myEditorSourceHeight = 0; myEditorTargetHeight = 0; dimensionsAreValid = false; }