From db2737b96a2cf82b3c1ced2549e4e795ffe13b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 26 Aug 2022 17:48:00 +0200 Subject: [PATCH] selection: restore <= 1.12 behavior in block selection wrt empty cells MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That is, highlight empty cells, regardless of whether they’re trailing or not. --- selection.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);