=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty.c,v retrieving revision 1.302 retrieving revision 1.303 diff -u -r1.302 -r1.303 --- src/usr.bin/tmux/tty.c 2018/05/07 13:39:09 1.302 +++ src/usr.bin/tmux/tty.c 2018/07/04 09:44:07 1.303 @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.302 2018/05/07 13:39:09 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.303 2018/07/04 09:44:07 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -913,6 +913,7 @@ int flags, cleared = 0; char buf[512]; size_t len, old_len; + u_int cellsize; flags = (tty->flags & TTY_NOCURSOR); tty->flags |= TTY_NOCURSOR; @@ -926,15 +927,17 @@ * there may be empty background cells after it (from BCE). */ sx = screen_size_x(s); - if (sx > gd->linedata[gd->hsize + py].cellsize) - sx = gd->linedata[gd->hsize + py].cellsize; + + cellsize = grid_get_line(gd, gd->hsize + py)->cellsize; + if (sx > cellsize) + sx = cellsize; if (sx > tty->sx) sx = tty->sx; ux = 0; if (wp == NULL || py == 0 || - (~gd->linedata[gd->hsize + py - 1].flags & GRID_LINE_WRAPPED) || + (~grid_get_line(gd, gd->hsize + py - 1)->flags & GRID_LINE_WRAPPED) || ox != 0 || tty->cx < tty->sx || screen_size_x(s) < tty->sx) {