diff --git a/src/TGUI/Widgets/TextBox.cpp b/src/TGUI/Widgets/TextBox.cpp index 909d2d1a..c1f4e00f 100644 --- a/src/TGUI/Widgets/TextBox.cpp +++ b/src/TGUI/Widgets/TextBox.cpp @@ -912,7 +912,7 @@ namespace tgui insert(); // Undo the insert if the text does not fit - if (oldText.getSize() + 1 != m_text.getSize()) + if (m_lines.size() > getInnerSize().y / m_lineHeight) { m_text = oldText; m_selStart = oldSelStart;