EA-37654 no idea why the document has changed during the pass

This commit is contained in:
peter
2012-07-25 16:57:57 +02:00
parent e34e3149c8
commit c9715dcedc
@@ -162,7 +162,8 @@ public class IdentifierHighlighterPass extends TextEditorHighlightingPass {
}
private HighlightInfo createHighlightInfo(TextRange range, HighlightInfoType type, Set<Pair<Object, TextRange>> existingMarkupTooltips) {
String tooltip = HighlightHandlerBase.getLineTextErrorStripeTooltip(myDocument, range.getStartOffset());
int start = range.getStartOffset();
String tooltip = start <= myDocument.getTextLength() ? HighlightHandlerBase.getLineTextErrorStripeTooltip(myDocument, start) : null;
return HighlightInfo.createHighlightInfo(type, range, null, existingMarkupTooltips.contains(new Pair<Object, TextRange>(tooltip, range)) ? null : tooltip, null);
}