diff --git a/src/ui/buffer.c b/src/ui/buffer.c index ad115986..a371c674 100644 --- a/src/ui/buffer.c +++ b/src/ui/buffer.c @@ -98,7 +98,8 @@ _buffer_add(ProfBuff buffer, const char* show_char, int pad_indent, GDateTime* t buffer->lines += e->_lines; // With 10% margin to ensure overflow prevention - while (buffer->lines >= PAD_SIZE - (PAD_SIZE / 10) && g_slist_length(buffer->entries) > 1) { + while (buffer->lines >= 20 && g_slist_length(buffer->entries) > 1) { + log_debug("DELETING"); // Delete message from the opposite size to free buffer GSList* buffer_entry_to_delete = append ? buffer->entries : g_slist_last(buffer->entries); ProfBuffEntry* entry_to_delete = (ProfBuffEntry*)buffer_entry_to_delete->data;