aboutsummaryrefslogtreecommitdiff
path: root/format-draw.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2020-12-01 10:01:22 +0000
committerThomas Adam <thomas@xteddy.org>2020-12-01 10:01:22 +0000
commit27634645e953baf046e1b74139deba7cbdde1ca2 (patch)
tree9b10d3bb68256bd3efca8d2af2f70aa9f4233026 /format-draw.c
parent70a5207bd10fb0896ff9f2adbbba0d9eac962155 (diff)
parent9a74bba007a60b93d1fdf68772e5cfb61b3558ff (diff)
downloadrtmux-27634645e953baf046e1b74139deba7cbdde1ca2.tar.gz
rtmux-27634645e953baf046e1b74139deba7cbdde1ca2.tar.bz2
rtmux-27634645e953baf046e1b74139deba7cbdde1ca2.zip
Merge branch 'obsd-master' into master
Diffstat (limited to 'format-draw.c')
-rw-r--r--format-draw.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/format-draw.c b/format-draw.c
index e73c5df4..67b961d9 100644
--- a/format-draw.c
+++ b/format-draw.c
@@ -563,13 +563,17 @@ format_draw(struct screen_write_ctx *octx, const struct grid_cell *base,
if (cp[0] == '#' && cp[1] != '[' && cp[1] != '\0') {
for (n = 1; cp[n] == '#'; n++)
/* nothing */;
+ even = ((n % 2) == 0);
if (cp[n] != '[') {
- width[current] += n;
cp += n;
+ if (even)
+ n = (n / 2);
+ else
+ n = (n / 2) + 1;
+ width[current] += n;
format_draw_many(&ctx[current], &sy, '#', n);
continue;
}
- even = ((n % 2) == 0);
if (even)
cp += (n + 1);
else