grid: snapshot: don’t mark all cells as dirty - copy state from source grid

This commit is contained in:
Daniel Eklöf 2021-02-26 09:25:27 +01:00
parent ed47a65afc
commit 792202bf29
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

4
grid.c
View file

@ -41,10 +41,8 @@ grid_snapshot(const struct grid *grid)
clone_row->linebreak = row->linebreak;
clone_row->dirty = row->dirty;
for (int c = 0; c < grid->num_cols; c++) {
for (int c = 0; c < grid->num_cols; c++)
clone_row->cells[c] = row->cells[c];
clone_row->cells[c].attrs.clean = 0;
}
if (row->extra != NULL) {
const struct row_data *extra = row->extra;