When clearing scrollback release used memory beyond ~2000 lines

This commit is contained in:
Kovid Goyal
2021-11-09 10:14:52 +05:30
parent 98dcb32a0c
commit 57583d6b00

View File

@@ -180,6 +180,8 @@ historybuf_clear(HistoryBuf *self) {
pagerhist_clear(self);
self->count = 0;
self->start_of_data = 0;
for (size_t i = 1; i < self->num_segments; i++) free_segment(self->segments + i);
self->num_segments = 1;
}
static bool