From 16a2e628d009dcf262f62c2c2d8b13696a2abf85 Mon Sep 17 00:00:00 2001 From: Vassiliy Date: Wed, 30 Oct 2013 12:40:47 +0400 Subject: [PATCH] http://ea.jetbrains.com/browser/ea_problems/49730 --- .../codeInsight/hint/DocumentFragmentTooltipRenderer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/platform-impl/src/com/intellij/codeInsight/hint/DocumentFragmentTooltipRenderer.java b/platform/platform-impl/src/com/intellij/codeInsight/hint/DocumentFragmentTooltipRenderer.java index 262b633457b7..e630db6d7f17 100644 --- a/platform/platform-impl/src/com/intellij/codeInsight/hint/DocumentFragmentTooltipRenderer.java +++ b/platform/platform-impl/src/com/intellij/codeInsight/hint/DocumentFragmentTooltipRenderer.java @@ -72,6 +72,7 @@ public class DocumentFragmentTooltipRenderer implements TooltipRenderer { if (endLine - startLine > maxLineCount) { endOffset = doc.getLineEndOffset(Math.max(0, Math.min(startLine + maxLineCount, doc.getLineCount() - 1))); } + if (endOffset < startOffset) return null; FoldingModelEx foldingModel = (FoldingModelEx)editor.getFoldingModel(); foldingModel.setFoldingEnabled(false);