aboutsummaryrefslogtreecommitdiff
path: root/grid.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2020-04-09 16:01:45 +0100
committerThomas Adam <thomas@xteddy.org>2020-04-09 16:01:45 +0100
commit52e3d960e7ebe2006509d48c427ffd8f25a0cf52 (patch)
tree8f6deb3d44616e92ff05735b4c587dfe3c5d8235 /grid.c
parent916c3787d7464f66287f83814d563ff36ff3a96a (diff)
parent26f5dfbe46c75f8b907ee75daaadde9a310d8dfb (diff)
downloadrtmux-52e3d960e7ebe2006509d48c427ffd8f25a0cf52.tar.gz
rtmux-52e3d960e7ebe2006509d48c427ffd8f25a0cf52.tar.bz2
rtmux-52e3d960e7ebe2006509d48c427ffd8f25a0cf52.zip
Merge branch 'obsd-master'
Diffstat (limited to 'grid.c')
-rw-r--r--grid.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/grid.c b/grid.c
index 9678bf59..f33bc98d 100644
--- a/grid.c
+++ b/grid.c
@@ -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++;
- }
}
/*