=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/grid-view.c,v retrieving revision 1.18 retrieving revision 1.19 diff -c -r1.18 -r1.19 *** src/usr.bin/tmux/grid-view.c 2014/11/10 19:53:32 1.18 --- src/usr.bin/tmux/grid-view.c 2014/11/12 22:59:45 1.19 *************** *** 1,4 **** ! /* $OpenBSD: grid-view.c,v 1.18 2014/11/10 19:53:32 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: grid-view.c,v 1.19 2014/11/12 22:59:45 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott *************** *** 184,190 **** px = grid_view_x(gd, px); py = grid_view_y(gd, py); ! sx = grid_view_x(gd, gd->sx); if (px == sx - 1) grid_clear(gd, px, py, 1, 1); --- 184,192 ---- px = grid_view_x(gd, px); py = grid_view_y(gd, py); ! sx = grid_view_x(gd, gd->linedata[py].cellsize); ! if (sx < px + nx) ! sx = px + nx; if (px == sx - 1) grid_clear(gd, px, py, 1, 1); *************** *** 201,207 **** px = grid_view_x(gd, px); py = grid_view_y(gd, py); ! sx = grid_view_x(gd, gd->sx); grid_move_cells(gd, px, px + nx, py, sx - px - nx); grid_clear(gd, sx - nx, py, px + nx - (sx - nx), 1); --- 203,211 ---- px = grid_view_x(gd, px); py = grid_view_y(gd, py); ! sx = grid_view_x(gd, gd->linedata[py].cellsize); ! if (sx < px + nx) ! sx = px + nx; grid_move_cells(gd, px, px + nx, py, sx - px - nx); grid_clear(gd, sx - nx, py, px + nx - (sx - nx), 1);