grid: reflow_uri_ranges(): URI end point is *inclusive*

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.
This commit is contained in:
Daniel Eklöf 2021-02-25 20:54:05 +01:00
parent 3149ef16c3
commit 8ffa0f731b
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

2
grid.c
View file

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