IDEA-56409 Soft wrap, editing: AIOOBE at EditorImpl$EditorSizeContainer.changedUpdate() on removing a code that doesn't fit editor's width and height

Added additional check for the situation when complete document is emptied
This commit is contained in:
Denis Zhdanov
2010-07-28 11:09:52 +04:00
parent 8bb207d4d1
commit 60be87e12e
@@ -4649,7 +4649,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
public synchronized void update(int startLine, int newEndLine, int oldEndLine) {
final int lineWidthSize = myLineWidths.size();
if (lineWidthSize == 0) {
if (lineWidthSize == 0 || myDocument.getTextLength() <= 0) {
reset();
}
else {