diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-06-26 15:34:12 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-06-26 15:34:12 +0000 |
commit | de2ea2d1786628172b4c5a19ee7c57246c95be3a (patch) | |
tree | a41b478e7b4842152f53e76dafe850bfe33fc5b3 /screen-write.c | |
parent | 3fcbe1e27bc8656742671733f987904818ca23d2 (diff) | |
download | rtmux-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.c | 2 |
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++; |