From daac28febb16f174a192d3e760e9790601e61b3d Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 7 Mar 2017 13:47:56 +0000 Subject: If moving cells outside the current used count, update it. --- grid.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/grid.c b/grid.c index 0fde6f62..424d272a 100644 --- a/grid.c +++ b/grid.c @@ -553,6 +553,8 @@ grid_move_cells(struct grid *gd, u_int dx, u_int px, u_int py, u_int nx, grid_expand_line(gd, py, dx + nx, 8); memmove(&gl->celldata[dx], &gl->celldata[px], nx * sizeof *gl->celldata); + if (dx + nx > gl->cellused) + gl->cellused = dx + nx; /* Wipe any cells that have been moved. */ for (xx = px; xx < px + nx; xx++) { -- cgit