@@ -374,25 +374,25 @@ struct NetworkChatWindow : public QueryS
item = 0;
/* Copy the buffer so we can modify it without damaging the real data */
pre_buf = (_chat_tab_completion_active) ? strdup(_chat_tab_completion_buf) : strdup(tb->buf);
tb_buf = ChatTabCompletionFindText(pre_buf);
tb_len = strlen(tb_buf);
while ((cur_name = ChatTabCompletionNextItem(&item)) != NULL) {
item++;
if (_chat_tab_completion_active) {
/* We are pressing TAB again on the same name, is there an other name
/* We are pressing TAB again on the same name, is there another name
* that starts with this? */
if (!second_scan) {
size_t offset;
size_t length;
/* If we are completing at the begin of the line, skip the ': ' we added */
if (tb_buf == pre_buf) {
offset = 0;
length = (tb->size - 1) - 2;
} else {
/* Else, find the place we are completing at */
offset = strlen(pre_buf) + 1;