From 2705e36f0ecf3ef50c13b41165de852f134859d6 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 2 Sep 2026 14:25:49 +0200 Subject: selection: treat spacer pad cells as empty cells when marking cells for highlighting --- selection.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'selection.c') diff --git a/selection.c b/selection.c index 1c432e75..85cc6a61 100644 --- a/selection.c +++ b/selection.c @@ -928,7 +928,9 @@ mark_selected_region(struct terminal *term, pixman_box32_t *boxes, for (int c = box->x1, empty_count = 0; c < box->x2; c++) { struct cell *cell = &row->cells[c]; - if (cell->wc == 0 && !highlight_empty) { + if ((cell->wc == 0 || cell->wc == CELL_SPACER) && + !highlight_empty) + { /* * We used to highlight empty cells *if* they were * followed by non-empty cell(s), since this -- cgit v1.3