render: urls: don’t use/allocate maximum allowed characters unless needed

This commit is contained in:
Daniel Eklöf 2021-02-07 10:50:31 +01:00
parent 0f57e6c422
commit b3043e92f6
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -2579,7 +2579,7 @@ render_urls(struct terminal *term)
size_t chars = wcslen(key) + (text_len > 0 ? 3 + text_len : 0);
const size_t max_chars = 50;
chars = max(chars, max_chars);
chars = min(chars, max_chars);
wchar_t label[chars + 2];
if (text_len == 0)