mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-19 15:56:24 -05:00
buffer-position (CTL-X =) displays EOF as current character when at end of file.
This commit is contained in:
parent
556ed8d41d
commit
3807410154
13
random.c
13
random.c
@ -102,9 +102,7 @@ int showcpos(int f, int n)
|
|||||||
if (curwp->w_dotp == curbp->b_linep) {
|
if (curwp->w_dotp == curbp->b_linep) {
|
||||||
predlines = numlines;
|
predlines = numlines;
|
||||||
predchars = numchars;
|
predchars = numchars;
|
||||||
#if PKCODE
|
bytes = 0 ;
|
||||||
curchar = 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get real column and end-of-line column. */
|
/* Get real column and end-of-line column. */
|
||||||
@ -119,9 +117,12 @@ int showcpos(int f, int n)
|
|||||||
ratio = (100L * predchars) / numchars;
|
ratio = (100L * predchars) / numchars;
|
||||||
|
|
||||||
/* summarize and report the info */
|
/* summarize and report the info */
|
||||||
mlwrite("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" ;
|
||||||
predlines + 1, numlines + 1, col, ecol,
|
if( bytes == 0)
|
||||||
predchars, numchars, ratio, (bytes > 1) ? "\\u" : "0x", curchar);
|
strcpy( &fmtbuf[ 39], "EOF") ;
|
||||||
|
|
||||||
|
mlwrite( fmtbuf, predlines + 1, numlines + 1, col, ecol, predchars,
|
||||||
|
numchars, ratio, (bytes > 1) ? "\\u" : "0x", curchar) ;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user