aboutsummaryrefslogtreecommitdiff
path: root/screen.c
diff options
context:
space:
mode:
authorThomas Adam <thomas.adam@smoothwall.net>2013-03-25 14:59:29 +0000
committerThomas Adam <thomas.adam@smoothwall.net>2013-03-25 14:59:29 +0000
commitf90eb43fcb12720711ea01b110c5b474111e6600 (patch)
tree43b2e85bcf1626e3810ade10578ac18399931772 /screen.c
parent418ba99078a2712ece398e17a5a9bc1f6600126b (diff)
parent58bb6f8c5650d496fb3b872766c0278aa024631d (diff)
downloadrtmux-f90eb43fcb12720711ea01b110c5b474111e6600.tar.gz
rtmux-f90eb43fcb12720711ea01b110c5b474111e6600.tar.bz2
rtmux-f90eb43fcb12720711ea01b110c5b474111e6600.zip
Merge branch 'obsd-master'
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/screen.c b/screen.c
index fe0b7389..e92c6aa7 100644
--- a/screen.c
+++ b/screen.c
@@ -363,15 +363,10 @@ screen_check_selection(struct screen *s, u_int px, u_int py)
/* Reflow wrapped lines. */
void
-screen_reflow(struct screen *s, u_int sx)
+screen_reflow(struct screen *s, u_int new_x)
{
- struct grid *old, *new;
+ struct grid *old = s->grid;
- old = s->grid;
- new = grid_create(old->sx, old->sy, old->hlimit);
-
- s->cy -= grid_reflow(new, old, sx);
- s->grid = new;
-
- grid_destroy(old);
+ s->grid = grid_create(old->sx, old->sy, old->hlimit);
+ s->cy -= grid_reflow(s->grid, old, new_x);
}