diff options
author | 2017-02-08 08:26:35 +0000 | |
---|---|---|
committer | 2017-02-08 08:26:35 +0000 | |
commit | 26cd2289d22465968d2a7718b7b26ca45926917d (patch) | |
tree | ae89bf81cd17d7adf4ed88fbc88563347060d1ba /usr.bin/tmux/grid.c | |
parent | Remove event watermarks, don't work well enough to be worth it. (diff) | |
download | wireguard-openbsd-26cd2289d22465968d2a7718b7b26ca45926917d.tar.xz wireguard-openbsd-26cd2289d22465968d2a7718b7b26ca45926917d.zip |
Tweak how much we expand lines by.
Diffstat (limited to 'usr.bin/tmux/grid.c')
-rw-r--r-- | usr.bin/tmux/grid.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/tmux/grid.c b/usr.bin/tmux/grid.c index 3580a415383..ff1ac8dba93 100644 --- a/usr.bin/tmux/grid.c +++ b/usr.bin/tmux/grid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grid.c,v 1.61 2017/02/03 20:53:03 nicm Exp $ */ +/* $OpenBSD: grid.c,v 1.62 2017/02/08 08:26:35 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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++) |