aboutsummaryrefslogtreecommitdiff
path: root/screen-write.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-06-26 15:34:12 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-06-26 15:34:12 +0000
commitde2ea2d1786628172b4c5a19ee7c57246c95be3a (patch)
treea41b478e7b4842152f53e76dafe850bfe33fc5b3 /screen-write.c
parent3fcbe1e27bc8656742671733f987904818ca23d2 (diff)
downloadrtmux-de2ea2d1786628172b4c5a19ee7c57246c95be3a.tar.gz
rtmux-de2ea2d1786628172b4c5a19ee7c57246c95be3a.tar.bz2
rtmux-de2ea2d1786628172b4c5a19ee7c57246c95be3a.zip
Status line fixes: don't truncate status-right now the length calculation is
done for UTF-8, limit to the maximum length correctly when printing, and always print a space even if the left string is longer than the width available.
Diffstat (limited to 'screen-write.c')
-rw-r--r--screen-write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/screen-write.c b/screen-write.c
index 2bbfb296..73e3fb2d 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -164,7 +164,7 @@ screen_write_vnputs(struct screen_write_ctx *ctx, ssize_t maxlen,
gc->flags &= ~GRID_FLAG_UTF8;
} else {
- if (maxlen > 0 && size > (size_t) maxlen)
+ if (maxlen > 0 && size + 1 > (size_t) maxlen)
break;
size++;