minibar: when the overnext character has zero width too, show its code

Requested-by: Peter Passchier <peter@passchier.net>
master
Benno Schulenberg 2021-01-07 19:17:22 +01:00
parent 41fd09706d
commit 4c6ce3c39d
1 changed files with 8 additions and 1 deletions

View File

@ -2162,10 +2162,17 @@ void minibar(void)
#ifdef ENABLE_UTF8
successor = this_position + char_length(this_position);
if (*this_position != '\0' && is_zerowidth(successor) &&
if (*this_position && *successor && is_zerowidth(successor) &&
mbtowc(&widecode, successor, MAXCHARLEN) >= 0) {
sprintf(hexadecimal, "|%04X", (int)widecode);
waddstr(bottomwin, hexadecimal);
successor += char_length(successor);
if (is_zerowidth(successor) && mbtowc(&widecode, successor, MAXCHARLEN) >= 0) {
sprintf(hexadecimal, "|%04X", (int)widecode);
waddstr(bottomwin, hexadecimal);
}
} else
successor = NULL;
#endif