nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit c62d12ca93da189c1cf41518ecef0c960585b486
parent 297633d086c0ac400081822b6fe55e30b1b2758f
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Thu,  7 Jan 2021 10:37:35 +0100

tweaks: drop a small optimization for invalid UTF-8 starter bytes

Diffstat:
Msrc/winio.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -2145,8 +2145,7 @@ void minibar(void) #ifdef ENABLE_UTF8 else if ((unsigned char)*this_position < 0x80 && using_utf8()) sprintf(hexadecimal, "U+%04X", (unsigned char)*this_position); - else if ((unsigned char)*this_position > 0xC1 && using_utf8() && - mbtowc(&widecode, this_position, MAXCHARLEN) >= 0) + else if (using_utf8() && mbtowc(&widecode, this_position, MAXCHARLEN) >= 0) sprintf(hexadecimal, "U+%04X", widecode); #endif else