diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-06-26 18:08:49 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-06-26 18:08:49 +0000 |
| commit | 3349c28fce77b0086396e4ee54e0b5d3859263c8 (patch) | |
| tree | 59abbe4406d5c3265379731e48550f1190e77871 | |
| parent | vt: execute: implement HT - horizontal tab (diff) | |
render: avoid division
| -rw-r--r-- | main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |
