EA-55354 - IOOBE: MarkupModelImpl.addLineHighlighter

This commit is contained in:
Egor.Ushakov
2014-03-27 15:10:40 +04:00
parent 979822c576
commit fb27b1998c
@@ -164,7 +164,7 @@ public class DetailViewImpl extends JPanel implements DetailView, UserDataHolder
getEditor().setBorder(IdeBorderFactory.createBorder(SideBorder.TOP));
clearHightlighting();
if (lineAttributes != null && positionToNavigate != null) {
if (lineAttributes != null && positionToNavigate != null && positionToNavigate.line < getEditor().getDocument().getLineCount()) {
myHighlighter = getEditor().getMarkupModel().addLineHighlighter(positionToNavigate.line, HighlighterLayer.SELECTION - 1,
lineAttributes);
}