=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/input.c,v retrieving revision 1.10 retrieving revision 1.11 diff -c -r1.10 -r1.11 *** src/usr.bin/tmux/input.c 2009/07/21 19:54:22 1.10 --- src/usr.bin/tmux/input.c 2009/08/07 00:12:13 1.11 *************** *** 1,4 **** ! /* $OpenBSD: input.c,v 1.10 2009/07/21 19:54:22 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: input.c,v 1.11 2009/08/07 00:12:13 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 1189,1195 **** wp->saved_grid, 0, s->grid, screen_hsize(s), sy); wp->saved_cx = s->cx; wp->saved_cy = s->cy; ! grid_view_clear(s->grid, 0, 0, sx, sy); wp->base.grid->flags &= ~GRID_HISTORY; --- 1189,1197 ---- wp->saved_grid, 0, s->grid, screen_hsize(s), sy); wp->saved_cx = s->cx; wp->saved_cy = s->cy; ! memcpy(&wp->saved_cell, ! &ictx->cell, sizeof wp->saved_cell); ! grid_view_clear(s->grid, 0, 0, sx, sy); wp->base.grid->flags &= ~GRID_HISTORY; *************** *** 1261,1267 **** if (sy > wp->saved_grid->sy) screen_resize(s, sx, wp->saved_grid->sy); ! /* Restore the grid and cursor position. */ grid_duplicate_lines( s->grid, screen_hsize(s), wp->saved_grid, 0, sy); s->cx = wp->saved_cx; --- 1263,1269 ---- if (sy > wp->saved_grid->sy) screen_resize(s, sx, wp->saved_grid->sy); ! /* Restore the grid, cursor position and cell. */ grid_duplicate_lines( s->grid, screen_hsize(s), wp->saved_grid, 0, sy); s->cx = wp->saved_cx; *************** *** 1270,1275 **** --- 1272,1278 ---- s->cy = wp->saved_cy; if (s->cy > screen_size_y(s) - 1) s->cy = screen_size_y(s) - 1; + memcpy(&ictx->cell, &wp->saved_cell, sizeof ictx->cell); /* * Turn history back on (so resize can use it) and then *************** *** 1326,1332 **** break; } } - } void --- 1329,1334 ----