diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-05-25 17:34:21 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-06-02 18:13:51 +0000 |
| commit | 5325ea042decae3d44d1cba54abb782a6fcd532c (patch) | |
| tree | 2fe068da8fcc6092c747d433b13da19962a221b8 | |
| parent | grid: fix col max calculation when row contains URI ranges (diff) | |
grid: no need to keep the tp_col/uri_col variables around
| -rw-r--r-- | grid.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -545,18 +545,15 @@ grid_resize_and_reflow( col_count = max(col_count, range->end + 1); for (int start = 0, left = col_count; left > 0;) { - int tp_col = -1; - 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; + int uri_col = (range->start >= start ? range->start : range->end) + 1; if (tp != NULL) { - tp_col = tp->col + 1; + int tp_col = tp->col + 1; end = min(tp_col, uri_col); tp_break = end == tp_col; @@ -566,7 +563,7 @@ grid_resize_and_reflow( uri_break = true; } } else if (tp != NULL) { - end = tp_col = tp->col + 1; + end = tp->col + 1; tp_break = true; } else end = col_count; |
