aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-08-26 15:48:00 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-08-26 15:48:00 +0000
commitdb2737b96a2cf82b3c1ced2549e4e795ffe13b04 (patch)
treee31066d6f7406467b1cd248b8a8143611b44023b
parentci (sr.ht): pull directly from git.sr.ht (diff)
selection: restore <= 1.12 behavior in block selection wrt empty cells
That is, highlight empty cells, regardless of whether they’re trailing or not.
-rw-r--r--selection.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/selection.c b/selection.c
index 5b65310c..5bf72e62 100644
--- a/selection.c
+++ b/selection.c
@@ -1110,7 +1110,9 @@ selection_dirty_cells(struct terminal *term)
int n_rects = -1;
pixman_box32_t *boxes =
pixman_region32_rectangles(&visible_and_selected, &n_rects);
- mark_selected_region(term, boxes, n_rects, true, false, false);
+
+ const bool highlight_empty = term->selection.kind == SELECTION_BLOCK;
+ mark_selected_region(term, boxes, n_rects, true, false, highlight_empty);
pixman_region32_fini(&visible_and_selected);
pixman_region32_fini(&view);