From cb83d60089d9acad356d731323dca3f9fdfcc3b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 2 Jun 2021 19:29:06 +0200 Subject: [PATCH] selection: fix bad assertion When there are multiple multi-column characters back-to-back, the cell before the pivot end point may in fact be a SPACER+1 cell. --- selection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selection.c b/selection.c index 4862def2..2b312139 100644 --- a/selection.c +++ b/selection.c @@ -623,9 +623,9 @@ set_pivot_point_for_block_and_char_wise(struct terminal *term, } xassert(term->grid->rows[pivot_start->row & (term->grid->num_rows - 1)]-> - cells[pivot_start->col].wc < CELL_SPACER); + cells[pivot_start->col].wc <= CELL_SPACER); xassert(term->grid->rows[pivot_end->row & (term->grid->num_rows - 1)]-> - cells[pivot_end->col].wc < CELL_SPACER); + cells[pivot_end->col].wc <= CELL_SPACER + 1); } void