|
@@ -3001,6 +3001,9 @@ void TextEdit::_update_caches() {
|
|
|
outline_color = get_theme_color(SNAME("font_outline_color"));
|
|
|
|
|
|
line_spacing = get_theme_constant(SNAME("line_spacing"));
|
|
|
+ if (text.get_line_height() + line_spacing < 1) {
|
|
|
+ WARN_PRINT("Line height is too small, please increase font_size and/or line_spacing");
|
|
|
+ }
|
|
|
|
|
|
background_color = get_theme_color(SNAME("background_color"));
|
|
|
current_line_color = get_theme_color(SNAME("current_line_color"));
|
|
@@ -3470,7 +3473,7 @@ int TextEdit::get_line_width(int p_line, int p_wrap_index) const {
|
|
|
}
|
|
|
|
|
|
int TextEdit::get_line_height() const {
|
|
|
- return text.get_line_height() + line_spacing;
|
|
|
+ return MAX(text.get_line_height() + line_spacing, 1);
|
|
|
}
|
|
|
|
|
|
int TextEdit::get_indent_level(int p_line) const {
|