mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
grid: set tp/uri break flags explicitly when we know them to be true
This commit is contained in:
parent
4b7e4fb885
commit
a56b54ad2f
1 changed files with 12 additions and 6 deletions
18
grid.c
18
grid.c
|
|
@ -549,26 +549,32 @@ grid_resize_and_reflow(
|
|||
int uri_col = -1;
|
||||
int end;
|
||||
|
||||
bool tp_break = false;
|
||||
bool uri_break = false;
|
||||
|
||||
if (range != NULL) {
|
||||
uri_col = (range->start >= start ? range->start : range->end) + 1;
|
||||
|
||||
if (tp != NULL) {
|
||||
tp_col = tp->col + 1;
|
||||
end = min(tp_col, uri_col);
|
||||
} else
|
||||
|
||||
tp_break = end == tp_col;
|
||||
uri_break = end == uri_col;
|
||||
} else {
|
||||
end = uri_col;
|
||||
} else if (tp != NULL)
|
||||
uri_break = true;
|
||||
}
|
||||
} else if (tp != NULL) {
|
||||
end = tp_col = tp->col + 1;
|
||||
else
|
||||
tp_break = true;
|
||||
} else
|
||||
end = col_count;
|
||||
|
||||
int cols = end - start;
|
||||
xassert(cols > 0);
|
||||
xassert(start + cols <= old_cols);
|
||||
|
||||
bool tp_break = tp_col == end;
|
||||
bool uri_break = uri_col == end;
|
||||
|
||||
for (int count = cols, from = start; count > 0;) {
|
||||
xassert(new_col_idx <= new_cols);
|
||||
int new_row_cells_left = new_cols - new_col_idx;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue