Move the code to set up a padding cell into grid.c.

This commit is contained in:
nicm
2020-06-02 20:51:46 +00:00
parent 2a4d4bda2b
commit 4694e9a2b6
5 changed files with 33 additions and 12 deletions

View File

@@ -38,10 +38,6 @@ static int screen_write_overwrite(struct screen_write_ctx *,
static const struct grid_cell *screen_write_combine(struct screen_write_ctx *,
const struct utf8_data *, u_int *);
static const struct grid_cell screen_write_pad_cell = {
{ { 0 }, 0, 0, 0 }, 0, GRID_FLAG_PADDING, 8, 8, 0
};
struct screen_write_collect_item {
u_int x;
int wrapped;
@@ -1774,7 +1770,7 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc)
*/
for (xx = s->cx + 1; xx < s->cx + width; xx++) {
log_debug("%s: new padding at %u,%u", __func__, xx, s->cy);
grid_view_set_cell(gd, xx, s->cy, &screen_write_pad_cell);
grid_view_set_padding(gd, xx, s->cy);
skip = 0;
}