diff options
Diffstat (limited to '')
| -rw-r--r-- | source/ui-shared.c | 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 1 insertion, 7 deletions
diff --git a/source/ui-shared.c b/source/ui-shared.c index 7d28c39..f3d815f 100644 --- a/source/ui-shared.c +++ b/source/ui-shared.c @@ -1039,13 +1039,7 @@ void cgit_commit_link(const char *name, const char *title, const char *class, html("'>"); if (name && name[0] != '\0') { if (ctx.cfg.max_msg_len >= MIN_TRUNCATE_LEN && strlen(name) > (size_t)ctx.cfg.max_msg_len) { - size_t len = ctx.cfg.max_msg_len - ELLIPSIS_LEN; - - // A cut inside a multibyte character would leave an - // invalid sequence on the page. - while (len > 0 && (name[len] & 0xC0) == 0x80) - len--; - html_ntxt(name, len); + html_ntxt(name, ctx.cfg.max_msg_len - ELLIPSIS_LEN); html("..."); } else { html_txt(name); |
