Add screen write flags instead of individual bits and fix line length

calculation with padding.
This commit is contained in:
nicm
2020-05-16 16:22:01 +00:00
parent 303d342d5f
commit ecbdcc256f
3 changed files with 8 additions and 4 deletions

4
grid.c
View File

@ -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--;
}