diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-07-15 07:22:06 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-07-15 07:22:06 +0000 |
| commit | bead6f36d6c5793baa1dd307c6a4e6fbeda46586 (patch) | |
| tree | bf102996cb75056fa5e7f2ac45f256e5b19064ac /selection.c | |
| parent | selection: row->dirty is a boolean (diff) | |
selection: don't skip SPACER cells in the generic foreach()
As that breaks e.g. selection marking (SPACER cells didn't get
inverted when rendered).
Instead, skip them in extract_one() only. I.e. when copying text from
the grid.
Diffstat (limited to 'selection.c')
| -rw-r--r-- | selection.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/selection.c b/selection.c index 7b94a359..165b7c46 100644 --- a/selection.c +++ b/selection.c @@ -134,8 +134,6 @@ foreach_selected_normal( c <= (r == end_row ? end_col : term->cols - 1); c++) { - if (row->cells[c].wc == CELL_MULT_COL_SPACER) - continue; cb(term, row, &row->cells[c], c, data); } @@ -168,8 +166,6 @@ foreach_selected_block( assert(row != NULL); for (int c = top_left.col; c <= bottom_right.col; c++) { - if (row->cells[c].wc == CELL_MULT_COL_SPACER) - continue; cb(term, row, &row->cells[c], c, data); } } @@ -269,6 +265,9 @@ extract_one(struct terminal *term, struct row *row, struct cell *cell, { struct extract *ctx = data; + if (cell->wc == CELL_MULT_COL_SPACER) + return; + if (ctx->last_row != NULL && row != ctx->last_row) { /* New row - determine if we should insert a newline or not */ |
