mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
grid: reflow: slightly simplified logic for end-coordinate calculation
This commit is contained in:
parent
315865f18c
commit
4b7e4fb885
1 changed files with 8 additions and 10 deletions
18
grid.c
18
grid.c
|
|
@ -549,19 +549,17 @@ grid_resize_and_reflow(
|
|||
int uri_col = -1;
|
||||
int end;
|
||||
|
||||
if (tp != NULL && range != NULL) {
|
||||
tp_col = tp->col + 1;
|
||||
if (range != NULL) {
|
||||
uri_col = (range->start >= start ? range->start : range->end) + 1;
|
||||
end = min(tp_col, uri_col);
|
||||
|
||||
if (tp != NULL) {
|
||||
tp_col = tp->col + 1;
|
||||
end = min(tp_col, uri_col);
|
||||
} else
|
||||
end = uri_col;
|
||||
} else if (tp != NULL)
|
||||
end = tp_col = tp->col + 1;
|
||||
else if (range != NULL) {
|
||||
if (range->start >= start)
|
||||
uri_col = range->start + 1;
|
||||
else
|
||||
uri_col = range->end + 1;
|
||||
end = uri_col;
|
||||
} else
|
||||
else
|
||||
end = col_count;
|
||||
|
||||
int cols = end - start;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue