diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -475,10 +475,16 @@ void term_sc_deccara(struct term *t, const struct csi *csi) void term_sc_decaln(struct term *t) { struct cell fill = { .c = 'E', .fg = TERM_COLOR_FG, .bg = TERM_COLOR_BG }; + struct cell *row0 = NULL; for (int y = 0; y < t->rows; y++) { int p = phys_row(t, y); struct cell *row = row_cells(t, p); - for (int x = 0; x < t->cols; x++) row[x] = fill; + if (row0) { + memcpy(row, row0, (size_t)t->cols * sizeof(struct cell)); + } else { + for (int x = 0; x < t->cols; x++) row[x] = fill; + row0 = row; + } struct srow *srow = &t->scr.slot[p]; srow->len = (uint16_t)t->cols; srow->flags = RF_TAIL_PADDED; |
