From 8ffa0f731b6a3bc11afef4cee78ef25f037fe168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 25 Feb 2021 20:54:05 +0100 Subject: [PATCH] grid: reflow_uri_ranges(): URI end point is *inclusive* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Which means, when we match URI start and end points against the current column index, we must *not* use ‘if...else if’, but two ‘if... if’. Fixes an assertion when resizing a window with an URI range of just one cell. --- grid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grid.c b/grid.c index 00890a1d..21cad71f 100644 --- a/grid.c +++ b/grid.c @@ -210,7 +210,7 @@ reflow_uri_ranges(const struct row *old_row, struct row *new_row, grid_row_add_uri_range(new_row, new_range); } - else if (it->item.end == old_col_idx) { + if (it->item.end == old_col_idx) { xassert(new_row->extra != NULL); bool found_it = false;