summaryrefslogtreecommitdiffstats
path: root/screen.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-04-02 11:02:44 +0100
committerThomas Adam <thomas@xteddy.org>2019-04-02 11:02:44 +0100
commitbfc1f0ca62356e1e32e34baa1f8ade168fa72de0 (patch)
treeee0c4542d22df704aea440e468cc923a96462af5 /screen.c
parentf03776c262ff68f4f5c3fefefd559256d534179d (diff)
parent7bcc0d16f24506bed6568ba36bcd278cfc06d069 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/screen.c b/screen.c
index eae5fb12..9b67e7e8 100644
--- a/screen.c
+++ b/screen.c
@@ -463,17 +463,17 @@ screen_select_cell(struct screen *s, struct grid_cell *dst,
static void
screen_reflow(struct screen *s, u_int new_x)
{
- u_int offset, cx = s->cx, cy = s->grid->hsize + s->cy;
+ u_int cx = s->cx, cy = s->grid->hsize + s->cy, wx, wy;
struct timeval start, tv;
gettimeofday(&start, NULL);
- offset = grid_to_offset(s->grid, cx, cy);
- log_debug("%s: cursor %u,%u offset is %u", __func__, cx, cy, offset);
+ grid_wrap_position(s->grid, cx, cy, &wx, &wy);
+ log_debug("%s: cursor %u,%u is %u,%u", __func__, cx, cy, wx, wy);
grid_reflow(s->grid, new_x);
- grid_from_offset(s->grid, offset, &cx, &cy);
+ grid_unwrap_position(s->grid, &cx, &cy, wx, wy);
log_debug("%s: new cursor is %u,%u", __func__, cx, cy);
if (cy >= s->grid->hsize) {