mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Some extra cleanups for /SB CLEAR.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1719 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
9beaf82839
commit
b9a83129fe
@ -966,6 +966,12 @@ void textbuffer_view_remove_line(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line)
|
||||
textbuffer_remove(view->buffer, line);
|
||||
}
|
||||
|
||||
static int g_free_true(void *data)
|
||||
{
|
||||
g_free(data);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Remove all lines from buffer. */
|
||||
void textbuffer_view_remove_all_lines(TEXT_BUFFER_VIEW_REC *view)
|
||||
{
|
||||
@ -975,6 +981,9 @@ void textbuffer_view_remove_all_lines(TEXT_BUFFER_VIEW_REC *view)
|
||||
|
||||
textbuffer_remove_all_lines(view->buffer);
|
||||
|
||||
g_hash_table_foreach_remove(view->bookmarks,
|
||||
(GHRFunc) g_free_true, NULL);
|
||||
|
||||
/* destroy line caches - note that you can't do simultaneously
|
||||
unrefs + cache_get()s or it will keep using the old caches */
|
||||
textbuffer_cache_unref(view->cache);
|
||||
|
@ -333,6 +333,7 @@ void textbuffer_remove_all_lines(TEXT_BUFFER_REC *buffer)
|
||||
|
||||
buffer->cur_line = NULL;
|
||||
buffer->lines_count = 0;
|
||||
buffer->last_eol = TRUE;
|
||||
}
|
||||
|
||||
void textbuffer_line2text(LINE_REC *line, int coloring, GString *str)
|
||||
|
Loading…
Reference in New Issue
Block a user