selection: restore <= 1.12 behavior in block selection wrt empty cells

That is, highlight empty cells, regardless of whether they’re trailing
or not.
This commit is contained in:
Daniel Eklöf 2022-08-26 17:48:00 +02:00
parent 03d3887e6b
commit 2354298eca
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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);