mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 16:28:17 +00:00
message: Some more has_mbyte/enc_utf8 removal
This commit is contained in:
@@ -1657,16 +1657,13 @@ static void msg_puts_display(const char_u *str, int maxlen, int attr,
|
||||
|
||||
// Display char in last column before showing more-prompt.
|
||||
if (*s >= ' ' && !cmdmsg_rl) {
|
||||
if (has_mbyte) {
|
||||
if (enc_utf8 && maxlen >= 0)
|
||||
/* avoid including composing chars after the end */
|
||||
l = utfc_ptr2len_len(s, (int)((str + maxlen) - s));
|
||||
else
|
||||
l = (*mb_ptr2len)(s);
|
||||
s = screen_puts_mbyte((char_u *)s, l, attr);
|
||||
if (maxlen >= 0) {
|
||||
// Avoid including composing chars after the end.
|
||||
l = utfc_ptr2len_len(s, (int)((str + maxlen) - s));
|
||||
} else {
|
||||
msg_screen_putchar(*s++, attr);
|
||||
l = utfc_ptr2len(s);
|
||||
}
|
||||
s = screen_puts_mbyte((char_u *)s, l, attr);
|
||||
did_last_char = true;
|
||||
} else {
|
||||
did_last_char = false;
|
||||
|
Reference in New Issue
Block a user