diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/ProblemDescriptionNode.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/ProblemDescriptionNode.java index 5a9dc80eedba..5c19584f6b3c 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/ProblemDescriptionNode.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/ProblemDescriptionNode.java @@ -132,7 +132,8 @@ public class ProblemDescriptionNode extends InspectionTreeNode { final TextRange elementRange = psiElement.getTextRange(); if (textRange!=null && elementRange!=null) { textRange = textRange.shiftRight(-elementRange.getStartOffset()); - ref = textRange.substring(ref); + if(textRange.getStartOffset() < 0 && textRange.getEndOffset()