mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 23:52:22 +02:00
one more extra cleanup for textbuffer_remove_all_lines()
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1720 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
b9a83129fe
commit
d248a87497
1 changed files with 4 additions and 2 deletions
|
|
@ -323,16 +323,18 @@ void textbuffer_remove_all_lines(TEXT_BUFFER_REC *buffer)
|
||||||
for (tmp = buffer->text_chunks; tmp != NULL; tmp = tmp->next)
|
for (tmp = buffer->text_chunks; tmp != NULL; tmp = tmp->next)
|
||||||
g_mem_chunk_free(text_chunk, tmp->data);
|
g_mem_chunk_free(text_chunk, tmp->data);
|
||||||
g_slist_free(buffer->text_chunks);
|
g_slist_free(buffer->text_chunks);
|
||||||
buffer->text_chunks = NULL;
|
buffer->text_chunks = NULL;
|
||||||
|
|
||||||
while (buffer->first_line != NULL) {
|
while (buffer->first_line != NULL) {
|
||||||
line = buffer->first_line->next;
|
line = buffer->first_line->next;
|
||||||
g_mem_chunk_free(line_chunk, buffer->first_line);
|
g_mem_chunk_free(line_chunk, buffer->first_line);
|
||||||
buffer->first_line = line;
|
buffer->first_line = line;
|
||||||
}
|
}
|
||||||
|
buffer->lines_count = 0;
|
||||||
|
|
||||||
buffer->cur_line = NULL;
|
buffer->cur_line = NULL;
|
||||||
buffer->lines_count = 0;
|
buffer->cur_text = NULL;
|
||||||
|
|
||||||
buffer->last_eol = TRUE;
|
buffer->last_eol = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue