=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/screen-write.c,v retrieving revision 1.21 retrieving revision 1.22 diff -c -r1.21 -r1.22 *** src/usr.bin/tmux/screen-write.c 2009/08/13 16:24:33 1.21 --- src/usr.bin/tmux/screen-write.c 2009/08/20 19:14:42 1.22 *************** *** 1,4 **** ! /* $OpenBSD: screen-write.c,v 1.21 2009/08/13 16:24:33 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: screen-write.c,v 1.22 2009/08/20 19:14:42 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 858,864 **** u_int xx; gc = grid_view_peek_cell(gd, s->cx, s->cy); ! gu = grid_view_peek_utf8(gd, s->cx, s->cy); if (gc->flags & GRID_FLAG_PADDING) { /* --- 858,865 ---- u_int xx; gc = grid_view_peek_cell(gd, s->cx, s->cy); ! if (gc->flags & GRID_FLAG_UTF8) ! gu = grid_view_peek_utf8(gd, s->cx, s->cy); if (gc->flags & GRID_FLAG_PADDING) { /* *************** *** 885,900 **** break; grid_view_set_cell(gd, xx, s->cy, &grid_default_cell); } ! } else if (gc->flags & GRID_FLAG_UTF8 && gu->width > 1) { ! /* ! * An UTF-8 wide cell; overwrite following padding cells only. ! */ ! xx = s->cx; ! while (++xx < screen_size_x(s)) { ! gc = grid_view_peek_cell(gd, xx, s->cy); ! if (!(gc->flags & GRID_FLAG_PADDING)) ! break; ! grid_view_set_cell(gd, xx, s->cy, &grid_default_cell); } } } --- 886,904 ---- break; grid_view_set_cell(gd, xx, s->cy, &grid_default_cell); } ! } else if (gc->flags & GRID_FLAG_UTF8) { ! gu = grid_view_peek_utf8(gd, s->cx, s->cy); ! if (gu->width > 1) { ! /* ! * An UTF-8 wide cell; overwrite following padding cells only. ! */ ! xx = s->cx; ! while (++xx < screen_size_x(s)) { ! gc = grid_view_peek_cell(gd, xx, s->cy); ! if (!(gc->flags & GRID_FLAG_PADDING)) ! break; ! grid_view_set_cell(gd, xx, s->cy, &grid_default_cell); ! } } } }