summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/widgets/textbox.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index d85f07b5d..37cf44135 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -229,6 +229,11 @@ void TextBox::setText(const std::string& text)
mCaretRow = 0;
mTextRows.clear();
+ if (text.empty())
+ {
+ adjustSize();
+ return;
+ }
size_t pos;
size_t lastPos = 0;