diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index fa510994112..a62ab0d0c87 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -459,7 +459,7 @@ void TextEdit::_notification(int p_what) { int line_number_char_count = 0; { - int lc = text.size() + 1; + int lc = text.size(); cache.line_number_w = 0; while (lc) { cache.line_number_w += 1;