diff options
author | nicm <nicm> | 2020-04-09 13:53:50 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-04-09 13:53:50 +0000 |
commit | 315961faeceefae30d3fcce28c3171fdec7e5c5d (patch) | |
tree | 9bfba9448636c417dba5dc6582bd6b825c6450d9 /grid.c | |
parent | b96ac809018c461b55aed66459a68a71dd08047f (diff) | |
download | rtmux-315961faeceefae30d3fcce28c3171fdec7e5c5d.tar.gz rtmux-315961faeceefae30d3fcce28c3171fdec7e5c5d.tar.bz2 rtmux-315961faeceefae30d3fcce28c3171fdec7e5c5d.zip |
Some more, and use of wp->window before wp NULL check in format.c.
Diffstat (limited to 'grid.c')
-rw-r--r-- | grid.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -1343,17 +1343,13 @@ grid_wrap_position(struct grid *gd, u_int px, u_int py, u_int *wx, u_int *wy) void grid_unwrap_position(struct grid *gd, u_int *px, u_int *py, u_int wx, u_int wy) { - u_int yy, ax = 0, ay = 0; + u_int yy, ay = 0; for (yy = 0; yy < gd->hsize + gd->sy - 1; yy++) { if (ay == wy) break; - if (gd->linedata[yy].flags & GRID_LINE_WRAPPED) - ax += gd->linedata[yy].cellused; - else { - ax = 0; + if (~gd->linedata[yy].flags & GRID_LINE_WRAPPED) ay++; - } } /* |