1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-09-28 00:15:54 -04:00

^X= buffer-position displays EOL character as \r for DOS. Number of characters in file is also reported correctly.

This commit is contained in:
Renaud 2015-05-05 12:17:56 +08:00
parent 267c218b9b
commit af919c3f9c

View File

@ -101,13 +101,13 @@ int showcpos(int f, int n)
predchars = numchars + curwp->w_doto; predchars = numchars + curwp->w_doto;
len = llength( lp) ; len = llength( lp) ;
if( (curwp->w_doto) == len) if( (curwp->w_doto) == len)
curchar = '\n'; curchar = (curbp->b_mode & MDDOS) ? '\r' : '\n' ;
else else
bytes = utf8_to_unicode( lp->l_text, curwp->w_doto, len, &curchar) ; bytes = utf8_to_unicode( lp->l_text, curwp->w_doto, len, &curchar) ;
} }
/* on to the next line */ /* on to the next line */
++numlines; ++numlines;
numchars += llength(lp) + 1; numchars += llength( lp) + ((curbp->b_mode & MDDOS) ? 2 : 1) ;
lp = lforw(lp); lp = lforw(lp);
} }