From acb4bd9e563a30922a136ccd60930f965bfe574a Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 8 Feb 2017 08:26:35 +0000 Subject: [PATCH] Tweak how much we expand lines by. --- grid.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/grid.c b/grid.c index f1dc130b..7fcddf61 100644 --- a/grid.c +++ b/grid.c @@ -292,11 +292,12 @@ grid_expand_line(struct grid *gd, u_int py, u_int sx, u_int bg) if (sx <= gl->cellsize) return; - if (sx < gd->sx) { - sx *= 2; - if (sx > gd->sx) - sx = gd->sx; - } + if (sx < gd->sx / 4) + sx = gd->sx / 4; + else if (sx < gd->sx / 2) + sx = gd->sx / 2; + else + sx = gd->sx; gl->celldata = xreallocarray(gl->celldata, sx, sizeof *gl->celldata); for (xx = gl->cellsize; xx < sx; xx++)