=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/grid-view.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/tmux/grid-view.c 2009/06/24 22:04:18 1.2 +++ src/usr.bin/tmux/grid-view.c 2009/06/29 21:30:50 1.3 @@ -1,4 +1,4 @@ -/* $OpenBSD: grid-view.c,v 1.2 2009/06/24 22:04:18 nicm Exp $ */ +/* $OpenBSD: grid-view.c,v 1.3 2009/06/29 21:30:50 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -158,6 +158,7 @@ sy = grid_view_y(gd, gd->sy); grid_move_lines(gd, py, py + ny, sy - py - ny); + grid_clear(gd, 0, sy - ny, gd->sx, py + ny - (sy - ny)); } /* Delete lines inside scroll region. */ @@ -191,7 +192,7 @@ if (px == sx - 1) grid_clear(gd, px, py, 1, 1); else - grid_move_cells(gd, px + nx, px, py, (sx - 1) - (px + nx)); + grid_move_cells(gd, px + nx, px, py, sx - px - nx); } /* Delete characters. */ @@ -207,7 +208,8 @@ sx = grid_view_x(gd, gd->sx); - grid_move_cells(gd, px, px + nx, py, (sx - 1) - (px + nx)); + grid_move_cells(gd, px, px + nx, py, sx - px - nx); + grid_clear(gd, sx - nx, py, px + nx - (sx - nx), 1); } /* Convert cells into a string. */