aboutsummaryrefslogtreecommitdiff
path: root/screen.c
diff options
context:
space:
mode:
authornicm <nicm>2017-11-15 19:21:24 +0000
committernicm <nicm>2017-11-15 19:21:24 +0000
commit533a5719c5edf53f0d7021d4340af230cc43ac8a (patch)
treeda123a233b70b2a4753fb5379fa0702efe218a42 /screen.c
parentaeda2e5808af7c4b629dce23d2b4331a77ecde83 (diff)
downloadrtmux-533a5719c5edf53f0d7021d4340af230cc43ac8a.tar.gz
rtmux-533a5719c5edf53f0d7021d4340af230cc43ac8a.tar.bz2
rtmux-533a5719c5edf53f0d7021d4340af230cc43ac8a.zip
Completely rewrite the reflow code to correctly handle double width
characters (previously they were not accounted for).
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/screen.c b/screen.c
index c792c04a..20616915 100644
--- a/screen.c
+++ b/screen.c
@@ -470,14 +470,5 @@ screen_select_cell(struct screen *s, struct grid_cell *dst,
static void
screen_reflow(struct screen *s, u_int new_x)
{
- struct grid *old = s->grid;
- u_int change;
-
- s->grid = grid_create(old->sx, old->sy, old->hlimit);
-
- change = grid_reflow(s->grid, old, new_x);
- if (change < s->cy)
- s->cy -= change;
- else
- s->cy = 0;
+ grid_reflow(s->grid, new_x, &s->cy);
}