void (MarkupModelEvent event) { RangeHighlighterImpl rangeHighlighter = (RangeHighlighterImpl)event.getHighlighter(); if (rangeHighlighter.isValid()) { int start = rangeHighlighter.getAffectedAreaStartOffset(); int end = rangeHighlighter.getAffectedAreaEndOffset(); int startLine = myDocument.getLineNumber(start); int endLine = myDocument.getLineNumber(end); repaintLines(Math.max(0, startLine - 1), Math.min(endLine + 1, getDocument().getLineCount())); } else { repaint(0, getDocument().getTextLength()); } ((EditorMarkupModelImpl)getMarkupModel()).repaint(); ((EditorMarkupModelImpl)getMarkupModel()).markDirtied(); GutterIconRenderer renderer = rangeHighlighter.getGutterIconRenderer(); if (renderer != null) { updateGutterSize(); } updateCaretCursor(); }