From 09a66451ce3df94120bb7d8486c89158bc5b85c6 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 14 May 2020 13:18:05 +0100 Subject: Add screen write flags instead of individual bits and fix line length calculation with padding. --- grid.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'grid.c') diff --git a/grid.c b/grid.c index 2437e2ea..06a82522 100644 --- a/grid.c +++ b/grid.c @@ -1391,7 +1391,9 @@ grid_line_length(struct grid *gd, u_int py) px = gd->sx; while (px > 0) { grid_get_cell(gd, px - 1, py, &gc); - if (gc.data.size != 1 || *gc.data.data != ' ') + if ((gc.flags & GRID_FLAG_PADDING) || + gc.data.size != 1 || + *gc.data.data != ' ') break; px--; } -- cgit