aboutsummaryrefslogtreecommitdiff
path: root/format-draw.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2022-02-22 14:01:10 +0000
committerThomas Adam <thomas@xteddy.org>2022-02-22 14:01:10 +0000
commit2be54886932e6214dfd67ba0b6d8c21fdaff4409 (patch)
tree9a5b87c33a0239640c98b11a38bd30d57143f593 /format-draw.c
parent88d9a8fc053a6653c78211690e5796c601bdba01 (diff)
parentfa71e9a07911715da596d618fe045943337c596b (diff)
downloadrtmux-2be54886932e6214dfd67ba0b6d8c21fdaff4409.tar.gz
rtmux-2be54886932e6214dfd67ba0b6d8c21fdaff4409.tar.bz2
rtmux-2be54886932e6214dfd67ba0b6d8c21fdaff4409.zip
Merge branch 'obsd-master' into master
Diffstat (limited to 'format-draw.c')
-rw-r--r--format-draw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/format-draw.c b/format-draw.c
index 1110535f..1a7e60b3 100644
--- a/format-draw.c
+++ b/format-draw.c
@@ -1154,13 +1154,13 @@ format_trim_right(const char *expanded, u_int limit)
while (*cp != '\0') {
if (*cp == '#') {
end = format_leading_hashes(cp, &n, &leading_width);
+ copy_width = leading_width;
if (width <= skip) {
- if (skip - width >= leading_width)
+ if (skip - width >= copy_width)
copy_width = 0;
else
copy_width -= (skip - width);
- } else
- copy_width = leading_width;
+ }
if (copy_width != 0) {
if (n == 1)
*out++ = '#';