aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2026-09-02 12:25:49 +0000
committerDaniel Eklöf <daniel@ekloef.se>2026-09-10 06:37:01 +0000
commit2705e36f0ecf3ef50c13b41165de852f134859d6 (patch)
tree8eec75fc6f363ef74105246b6162d56a90fd965a /selection.c
parentselection: don't allow the start/end-points to be inside spacer pad cells (diff)
selection: treat spacer pad cells as empty cells when marking cells for highlighting
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c4
1 files changed, 3 insertions, 1 deletions
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