IDEA-65613 Wrong EditorTextField initial size in several places in UI

Editor size calculation algorithm is corrected in order to have one line height as a minimum preferred size height value (used to return zero-height for the empty document)
This commit is contained in:
Denis Zhdanov
2011-02-17 13:07:22 +03:00
parent c4b0be9abd
commit 4f89fcf322
@@ -5552,7 +5552,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
maxWidth = Math.max(maxWidth, myLineWidths.getQuick(i));
}
mySize = new Dimension(maxWidth, getLineHeight() * getVisibleLineCount());
mySize = new Dimension(maxWidth, getLineHeight() * Math.max(getVisibleLineCount(), 1));
myIsDirty = false;
}