summaryrefslogtreecommitdiff
path: root/plugingui/textedit.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui/textedit.cc')
-rw-r--r--plugingui/textedit.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugingui/textedit.cc b/plugingui/textedit.cc
index ebe8d32..fd2f891 100644
--- a/plugingui/textedit.cc
+++ b/plugingui/textedit.cc
@@ -50,7 +50,7 @@ void TextEdit::resize(std::size_t width, std::size_t height)
needs_preprocessing = true;
scroll.move(width - 2*x_border - 3, y_border - 1);
- scroll.resize(scroll.width(), height - 2*(y_border - 1));
+ scroll.resize(scroll.width(), std::max((int)height - 2*(y_border - 1), 0));
}
void TextEdit::setReadOnly(bool readonly)