diff options
Diffstat (limited to 'grid.c')
-rw-r--r-- | grid.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -284,9 +284,9 @@ grid_clear_history(struct grid *gd) /* Scroll a region up, moving the top line into the history. */ void -grid_scroll_history_region(struct grid *gd, u_int upper, u_int lower) +grid_scroll_history_region(struct grid *gd, u_int upper, u_int lower, u_int bg) { - struct grid_line *gl_history, *gl_upper, *gl_lower; + struct grid_line *gl_history, *gl_upper; u_int yy; /* Create a space for a new line. */ @@ -302,14 +302,13 @@ grid_scroll_history_region(struct grid *gd, u_int upper, u_int lower) upper++; gl_upper = &gd->linedata[upper]; lower++; - gl_lower = &gd->linedata[lower]; /* Move the line into the history. */ memcpy(gl_history, gl_upper, sizeof *gl_history); /* Then move the region up and clear the bottom line. */ memmove(gl_upper, gl_upper + 1, (lower - upper) * sizeof *gl_upper); - memset(gl_lower, 0, sizeof *gl_lower); + grid_empty_line(gd, lower, bg); /* Move the history offset down over the line. */ gd->hscrolled++; @@ -666,8 +665,7 @@ grid_string_cells_bg(const struct grid_cell *gc, int *values) /* * Returns ANSI code to set particular attributes (colour, bold and so on) - * given a current state. The output buffer must be able to hold at least 57 - * bytes. + * given a current state. */ static void grid_string_cells_code(const struct grid_cell *lastgc, |