mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
render: avoid division
This commit is contained in:
parent
dbd883935b
commit
3349c28fce
1 changed files with 2 additions and 1 deletions
3
main.c
3
main.c
|
|
@ -89,7 +89,8 @@ grid_render_update(struct context *c, struct buffer *buf, const struct damage *d
|
|||
col = dmg->range.start % cols;
|
||||
linear_cursor < dmg->range.start + dmg->range.length;
|
||||
linear_cursor++,
|
||||
col = (col + 1) % cols,
|
||||
//col = (col + 1) % cols,
|
||||
col = col + 1 >= c->term.grid.cols ? 0 : col + 1,
|
||||
row += col == 0 ? 1 : 0)
|
||||
{
|
||||
//LOG_DBG("UPDATE: %d (%dx%d)", linear_cursor, row, col);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue