diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-11-25 19:33:07 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-11-25 19:33:07 +0000 |
| commit | 434c8e41216e2abb08e51c3241bcd0a0e40a1ce6 (patch) | |
| tree | b039212cd6ed14e70706fd6f036a7171ab1e8b1d /grid.c | |
| parent | resize: don’t reflow text on alt screen (diff) | |
grid: resize_without_reflow: don’t call min() on every loop iteration
Diffstat (limited to 'grid.c')
| -rw-r--r-- | grid.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -73,7 +73,7 @@ grid_resize_without_reflow( int new_offset = 0; /* Copy old lines, truncating them if old rows were longer */ - for (int r = 0; r < min(old_screen_rows, new_screen_rows); r++) { + for (int r = 0, n = min(old_screen_rows, new_screen_rows); r < n; r++) { const int old_row_idx = (grid->offset + r) & (old_rows - 1); const int new_row_idx = (new_offset + r) & (new_rows - 1); |
