aboutsummaryrefslogtreecommitdiff
path: root/screen-write.c
diff options
context:
space:
mode:
Diffstat (limited to 'screen-write.c')
-rw-r--r--screen-write.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/screen-write.c b/screen-write.c
index 75080d8b..842d27cf 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -408,7 +408,7 @@ screen_write_fast_copy(struct screen_write_ctx *ctx, struct screen *src,
break;
cx = s->cx;
for (xx = px; xx < px + nx; xx++) {
- if (xx >= gd->linedata[yy].cellsize)
+ if (xx >= grid_get_line(gd, yy)->cellsize)
break;
grid_get_cell(gd, xx, yy, &gc);
if (xx + gc.data.width > px + nx)
@@ -694,7 +694,7 @@ screen_write_backspace(struct screen_write_ctx *ctx)
if (s->cx == 0) {
if (s->cy == 0)
return;
- gl = &s->grid->linedata[s->grid->hsize + s->cy - 1];
+ 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,7 +917,7 @@ screen_write_clearline(struct screen_write_ctx *ctx, u_int bg)
struct tty_ctx ttyctx;
u_int sx = screen_size_x(s);
- gl = &s->grid->linedata[s->grid->hsize + s->cy];
+ gl = grid_get_line(s->grid, s->grid->hsize + s->cy);
if (gl->cellsize == 0 && bg == 8)
return;
@@ -940,7 +940,7 @@ screen_write_clearendofline(struct screen_write_ctx *ctx, u_int bg)
struct tty_ctx ttyctx;
u_int sx = screen_size_x(s);
- gl = &s->grid->linedata[s->grid->hsize + s->cy];
+ gl = grid_get_line(s->grid, s->grid->hsize + s->cy);
if (s->cx > sx - 1 || (s->cx >= gl->cellsize && bg == 8))
return;
@@ -1043,7 +1043,7 @@ screen_write_linefeed(struct screen_write_ctx *ctx, int wrapped, u_int bg)
struct grid *gd = s->grid;
struct grid_line *gl;
- gl = &gd->linedata[gd->hsize + s->cy];
+ gl = grid_get_line(gd, gd->hsize + s->cy);
if (wrapped)
gl->flags |= GRID_LINE_WRAPPED;
else
@@ -1433,7 +1433,7 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc)
screen_write_initctx(ctx, &ttyctx);
/* Handle overwriting of UTF-8 characters. */
- gl = &s->grid->linedata[s->grid->hsize + s->cy];
+ 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))