diff options
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_chat_gui.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp index af5782037..d3caed015 100644 --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -437,14 +437,11 @@ struct NetworkChatWindow : public QueryStringBaseWindow { /* Change to the found name. Add ': ' if we are at the start of the line (pretty) */ if (pre_buf == tb_buf) { - snprintf(tb->buf, this->edit_str_size, "%s: ", cur_name); + this->text.Print("%s: ", cur_name); } else { - snprintf(tb->buf, this->edit_str_size, "%s %s", pre_buf, cur_name); + this->text.Print("%s %s", pre_buf, cur_name); } - /* Update the textbuffer */ - this->text.UpdateSize(); - this->SetDirty(); free(pre_buf); return; @@ -453,12 +450,9 @@ struct NetworkChatWindow : public QueryStringBaseWindow { if (second_scan) { /* We walked all posibilities, and the user presses tab again.. revert to original text */ - strcpy(tb->buf, _chat_tab_completion_buf); + this->text.Assign(_chat_tab_completion_buf); _chat_tab_completion_active = false; - /* Update the textbuffer */ - this->text.UpdateSize(); - this->SetDirty(); } free(pre_buf); |