diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPass.java index c2db6f0b7c31..04ddcde18fa8 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPass.java @@ -162,7 +162,8 @@ public class IdentifierHighlighterPass extends TextEditorHighlightingPass { } private HighlightInfo createHighlightInfo(TextRange range, HighlightInfoType type, Set> 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(tooltip, range)) ? null : tooltip, null); }