=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/window.c,v retrieving revision 1.88 retrieving revision 1.89 diff -u -r1.88 -r1.89 --- src/usr.bin/tmux/window.c 2013/01/17 00:11:22 1.88 +++ src/usr.bin/tmux/window.c 2013/02/05 11:08:59 1.89 @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.88 2013/01/17 00:11:22 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.89 2013/02/05 11:08:59 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -853,7 +853,7 @@ ws.ws_col = sx; ws.ws_row = sy; - screen_resize(&wp->base, sx, sy); + screen_resize(&wp->base, sx, sy, wp->saved_grid == NULL); if (wp->mode != NULL) wp->mode->resize(wp, sx, sy); @@ -914,7 +914,7 @@ * before copying back. */ if (sy > wp->saved_grid->sy) - screen_resize(s, sx, wp->saved_grid->sy); + screen_resize(s, sx, wp->saved_grid->sy, 1); /* Restore the grid, cursor position and cell. */ grid_duplicate_lines(s->grid, screen_hsize(s), wp->saved_grid, 0, sy); @@ -933,8 +933,8 @@ * the current size. */ wp->base.grid->flags |= GRID_HISTORY; - if (sy > wp->saved_grid->sy) - screen_resize(s, sx, sy); + if (sy > wp->saved_grid->sy || sx != wp->saved_grid->sx) + screen_resize(s, sx, sy, 1); grid_destroy(wp->saved_grid); wp->saved_grid = NULL;