void (int startOffset, int endOffset) { ThreadingAssertions.assertEventDispatchThread(); if (myScrollPane == null) { return; } if (endOffset > myDocument.getTextLength()) { endOffset = myDocument.getTextLength(); } if (startOffset < endOffset) { int startLine = myDocument.getLineNumber(startOffset); int endLine = myDocument.getLineNumber(endOffset); repaintLines(startLine, endLine); } }