1
0
mirror of https://github.com/rfivet/uemacs.git synced 2025-11-23 11:41:15 -05:00

Consistent interface to deal with workaround on Cygwin when checking width of unicode character > 0xFFFF.

This commit is contained in:
2021-08-15 09:41:35 +08:00
parent 3bce7a4751
commit 109e330861
5 changed files with 174 additions and 207 deletions

View File

@@ -44,10 +44,8 @@ static unsigned getgoal( line_p dlp) {
col += 2 ;
else if( c >= 0x80 && c <= 0xA0) /* \xx */
col += 3 ;
else {
int w = utf8_width( c) ; /* work around */
col += (w < 0) ? 2 : w ; /* unknown unicode width as \u */
}
else
col += utf8_width( c) ;
if( col > curgoal)
break ;