summaryrefslogtreecommitdiffstats
path: root/grid-view.c
diff options
context:
space:
mode:
authornicm <nicm>2017-08-30 18:13:47 +0000
committernicm <nicm>2017-08-30 18:13:47 +0000
commit6abfd9b8ff344a684740452f16ddeaffb1df7d12 (patch)
treef1d1e004ff5061b62093d91e03bf46c6a453b622 /grid-view.c
parent17cf1b21c6c30a2d7b8cf7d9a29f495a9b01c475 (diff)
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.
Diffstat (limited to 'grid-view.c')
-rw-r--r--grid-view.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/grid-view.c b/grid-view.c
index 033ec033..1bb77317 100644
--- a/grid-view.c
+++ b/grid-view.c
@@ -75,7 +75,7 @@ grid_view_clear_history(struct grid *gd, u_int bg)
/* Scroll the lines into the history. */
for (yy = 0; yy < last; yy++) {
- grid_collect_history(gd, bg);
+ grid_collect_history(gd);
grid_scroll_history(gd, bg);
}
if (last < gd->sy)
@@ -100,7 +100,7 @@ grid_view_scroll_region_up(struct grid *gd, u_int rupper, u_int rlower,
u_int bg)
{
if (gd->flags & GRID_HISTORY) {
- grid_collect_history(gd, bg);
+ grid_collect_history(gd);
if (rupper == 0 && rlower == gd->sy - 1)
grid_scroll_history(gd, bg);
else {