Instead of overloading the line clear function to mean free if

background is default (8), introduce an explicit free function and use
it where a free alone is needed. Likewise, use memmove directly rather
than grid_move_lines where it makes sense. Based on a memory leak fix by
Dan Aloni in GitHub issue 1051.
This commit is contained in:
nicm
2017-08-30 18:13:47 +00:00
parent 17cf1b21c6
commit 6abfd9b8ff
3 changed files with 51 additions and 31 deletions

2
tmux.h
View File

@ -1973,7 +1973,7 @@ int grid_cells_equal(const struct grid_cell *, const struct grid_cell *);
struct grid *grid_create(u_int, u_int, u_int);
void grid_destroy(struct grid *);
int grid_compare(struct grid *, struct grid *);
void grid_collect_history(struct grid *, u_int);
void grid_collect_history(struct grid *);
void grid_scroll_history(struct grid *, u_int);
void grid_scroll_history_region(struct grid *, u_int, u_int, u_int);
void grid_clear_history(struct grid *);