^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
1 changed files with 2 additions and 2 deletions

View File

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