mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-95452 -1: -1 java.lang.AssertionError: -1
This commit is contained in:
@@ -3262,10 +3262,11 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
int lineHeight = myLineHeight;
|
||||
if (lineHeight == -1) {
|
||||
FontMetrics fontMetrics = myEditorComponent.getFontMetrics(myScheme.getFont(EditorFontType.PLAIN));
|
||||
lineHeight = (int)(fontMetrics.getHeight() * (isOneLineMode() ? 1 : myScheme.getLineSpacing()));
|
||||
if (lineHeight == 0) {
|
||||
lineHeight = fontMetrics.getHeight();
|
||||
if (lineHeight == 0) {
|
||||
int fontMetricsHeight = fontMetrics.getHeight();
|
||||
lineHeight = (int)(fontMetricsHeight * (isOneLineMode() ? 1 : myScheme.getLineSpacing()));
|
||||
if (lineHeight <= 0) {
|
||||
lineHeight = fontMetricsHeight;
|
||||
if (lineHeight <= 0) {
|
||||
lineHeight = 12;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user