From c9715dcedc16b7c75aca9ecbe7e032f12634a7c1 Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 25 Jul 2012 14:55:10 +0200 Subject: [PATCH] EA-37654 no idea why the document has changed during the pass --- .../codeInsight/daemon/impl/IdentifierHighlighterPass.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }