summaryrefslogtreecommitdiff
path: root/src/fe-text/textbuffer.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-08-08 15:48:54 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-08-08 15:48:54 +0000
commitd248a87497a39841e9f020dc6b67cc72fbbaa6ce (patch)
treeca20f7bd54446d3215e22747377e1586ed0b5814 /src/fe-text/textbuffer.c
parentb9a83129fe65d6d81d0ef82d5bf7814018700a8d (diff)
downloadirssi-d248a87497a39841e9f020dc6b67cc72fbbaa6ce.zip
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
Diffstat (limited to 'src/fe-text/textbuffer.c')
-rw-r--r--src/fe-text/textbuffer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fe-text/textbuffer.c b/src/fe-text/textbuffer.c
index 743cd2a2..adf3334d 100644
--- a/src/fe-text/textbuffer.c
+++ b/src/fe-text/textbuffer.c
@@ -323,16 +323,18 @@ void textbuffer_remove_all_lines(TEXT_BUFFER_REC *buffer)
for (tmp = buffer->text_chunks; tmp != NULL; tmp = tmp->next)
g_mem_chunk_free(text_chunk, tmp->data);
g_slist_free(buffer->text_chunks);
- buffer->text_chunks = NULL;
+ buffer->text_chunks = NULL;
while (buffer->first_line != NULL) {
line = buffer->first_line->next;
g_mem_chunk_free(line_chunk, buffer->first_line);
buffer->first_line = line;
}
+ buffer->lines_count = 0;
buffer->cur_line = NULL;
- buffer->lines_count = 0;
+ buffer->cur_text = NULL;
+
buffer->last_eol = TRUE;
}