summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 2884b303..8cf5f8ac 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -3258,9 +3258,8 @@ maketitle()
if (maxlen > 0)
{
/* make it shorter by removing a bit in the middle */
- len = vim_strsize(buf);
- if (len > maxlen)
- trunc_string(buf, buf, maxlen);
+ if (vim_strsize(buf) > maxlen)
+ trunc_string(buf, buf, maxlen, IOSIZE);
}
}
}