=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/screen.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- src/usr.bin/tmux/screen.c 2013/02/05 11:08:59 1.24 +++ src/usr.bin/tmux/screen.c 2013/03/21 16:12:10 1.25 @@ -1,4 +1,4 @@ -/* $OpenBSD: screen.c,v 1.24 2013/02/05 11:08:59 nicm Exp $ */ +/* $OpenBSD: screen.c,v 1.25 2013/03/21 16:12:10 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -362,15 +362,10 @@ /* 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); }