=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/screen-write.c,v retrieving revision 1.136 retrieving revision 1.137 diff -c -r1.136 -r1.137 *** src/usr.bin/tmux/screen-write.c 2018/01/12 16:43:47 1.136 --- src/usr.bin/tmux/screen-write.c 2018/07/04 09:44:07 1.137 *************** *** 1,4 **** ! /* $OpenBSD: screen-write.c,v 1.136 2018/01/12 16:43:47 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: screen-write.c,v 1.137 2018/07/04 09:44:07 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 408,414 **** break; cx = s->cx; for (xx = px; xx < px + nx; xx++) { ! if (xx >= gd->linedata[yy].cellsize) break; grid_get_cell(gd, xx, yy, &gc); if (xx + gc.data.width > px + nx) --- 408,414 ---- break; cx = s->cx; for (xx = px; xx < px + nx; xx++) { ! if (xx >= grid_get_line(gd, yy)->cellsize) break; grid_get_cell(gd, xx, yy, &gc); if (xx + gc.data.width > px + nx) *************** *** 694,700 **** if (s->cx == 0) { if (s->cy == 0) return; ! gl = &s->grid->linedata[s->grid->hsize + s->cy - 1]; if (gl->flags & GRID_LINE_WRAPPED) { s->cy--; s->cx = screen_size_x(s) - 1; --- 694,700 ---- if (s->cx == 0) { if (s->cy == 0) return; ! gl = grid_get_line(s->grid, s->grid->hsize + s->cy - 1); if (gl->flags & GRID_LINE_WRAPPED) { s->cy--; s->cx = screen_size_x(s) - 1; *************** *** 917,923 **** struct tty_ctx ttyctx; u_int sx = screen_size_x(s); ! gl = &s->grid->linedata[s->grid->hsize + s->cy]; if (gl->cellsize == 0 && bg == 8) return; --- 917,923 ---- struct tty_ctx ttyctx; u_int sx = screen_size_x(s); ! gl = grid_get_line(s->grid, s->grid->hsize + s->cy); if (gl->cellsize == 0 && bg == 8) return; *************** *** 940,946 **** struct tty_ctx ttyctx; u_int sx = screen_size_x(s); ! gl = &s->grid->linedata[s->grid->hsize + s->cy]; if (s->cx > sx - 1 || (s->cx >= gl->cellsize && bg == 8)) return; --- 940,946 ---- struct tty_ctx ttyctx; u_int sx = screen_size_x(s); ! gl = grid_get_line(s->grid, s->grid->hsize + s->cy); if (s->cx > sx - 1 || (s->cx >= gl->cellsize && bg == 8)) return; *************** *** 1043,1049 **** struct grid *gd = s->grid; struct grid_line *gl; ! gl = &gd->linedata[gd->hsize + s->cy]; if (wrapped) gl->flags |= GRID_LINE_WRAPPED; else --- 1043,1049 ---- struct grid *gd = s->grid; struct grid_line *gl; ! gl = grid_get_line(gd, gd->hsize + s->cy); if (wrapped) gl->flags |= GRID_LINE_WRAPPED; else *************** *** 1433,1439 **** screen_write_initctx(ctx, &ttyctx); /* Handle overwriting of UTF-8 characters. */ ! gl = &s->grid->linedata[s->grid->hsize + s->cy]; if (gl->flags & GRID_LINE_EXTENDED) { grid_view_get_cell(gd, s->cx, s->cy, &now_gc); if (screen_write_overwrite(ctx, &now_gc, width)) --- 1433,1439 ---- screen_write_initctx(ctx, &ttyctx); /* Handle overwriting of UTF-8 characters. */ ! gl = grid_get_line(s->grid, s->grid->hsize + s->cy); if (gl->flags & GRID_LINE_EXTENDED) { grid_view_get_cell(gd, s->cx, s->cy, &now_gc); if (screen_write_overwrite(ctx, &now_gc, width))