mirror of
https://github.com/rfivet/uemacs.git
synced 2024-11-19 02:56:08 -05:00
buffer-position (CTL-X =) reports 100% ratio when at end of file even for empty buffer.
This commit is contained in:
parent
3807410154
commit
659ada8b64
5
random.c
5
random.c
@ -112,9 +112,8 @@ int showcpos(int f, int n)
|
|||||||
ecol = getccol(FALSE);
|
ecol = getccol(FALSE);
|
||||||
curwp->w_doto = savepos;
|
curwp->w_doto = savepos;
|
||||||
|
|
||||||
ratio = 0; /* Ratio before dot. */
|
/* Ratio before dot. */
|
||||||
if (numchars != 0)
|
ratio = (numchars == 0) ? 100 : (100L * predchars) / numchars ;
|
||||||
ratio = (100L * predchars) / numchars;
|
|
||||||
|
|
||||||
/* summarize and report the info */
|
/* summarize and report the info */
|
||||||
char fmtbuf[] = "Line %d/%d Col %d/%d Char %D/%D (%d%%) char = %s%x" ;
|
char fmtbuf[] = "Line %d/%d Col %d/%d Char %D/%D (%d%%) char = %s%x" ;
|
||||||
|
Loading…
Reference in New Issue
Block a user