aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authormathias <mathias>2004-12-18 02:44:11 (GMT)
committermathias <mathias>2004-12-18 02:44:11 (GMT)
commit33d90f7a5e27a67bfe87a89b828528e0eb033123 (patch)
tree31425c4391ade1f4a03f47523be4715f57a4116f /src/FbTk
parentc7baeb1ae2c9eba2457a279f1be29517f6ac49d5 (diff)
downloadfluxbox-33d90f7a5e27a67bfe87a89b828528e0eb033123.zip
fluxbox-33d90f7a5e27a67bfe87a89b828528e0eb033123.tar.bz2
fix segfaulting when new text is smaller than the oldtext,
m_start_pos has to be 0 before calculating anything else.
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/TextBox.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/FbTk/TextBox.cc b/src/FbTk/TextBox.cc
index 0454f87..2a7000a 100644
--- a/src/FbTk/TextBox.cc
+++ b/src/FbTk/TextBox.cc
@@ -69,6 +69,7 @@ TextBox::~TextBox() {
69 69
70void TextBox::setText(const std::string &text) { 70void TextBox::setText(const std::string &text) {
71 m_text = text; 71 m_text = text;
72 m_start_pos = 0;
72 cursorEnd(); 73 cursorEnd();
73 adjustStartPos(); 74 adjustStartPos();
74} 75}