mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-17 23:06:25 -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);
|
||||
curwp->w_doto = savepos;
|
||||
|
||||
ratio = 0; /* Ratio before dot. */
|
||||
if (numchars != 0)
|
||||
ratio = (100L * predchars) / numchars;
|
||||
/* Ratio before dot. */
|
||||
ratio = (numchars == 0) ? 100 : (100L * predchars) / numchars ;
|
||||
|
||||
/* summarize and report the info */
|
||||
char fmtbuf[] = "Line %d/%d Col %d/%d Char %D/%D (%d%%) char = %s%x" ;
|
||||
|
Loading…
Reference in New Issue
Block a user