1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-18 15:26:23 -05:00

Align cursor movement according to character representation (^c and \nn).

This commit is contained in:
Renaud 2015-01-31 07:57:26 +08:00
parent a6a8936b8d
commit 7c74bfdc1a

View File

@ -576,6 +576,12 @@ void updpos(void)
i += bytes; i += bytes;
if (c == '\t') if (c == '\t')
curcol |= tabmask; curcol |= tabmask;
else if( bytes == 1) {
if( c < 0x20 || c == 0x7F)
curcol += 1 ; /* displayed as ^c */
else if( c >= 0x80 && c <= 0xA0)
curcol += 2 ; /* displayed as \xx */
}
++curcol; ++curcol;
} }