aboutsummaryrefslogtreecommitdiffstats
path: root/display.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-10-26 08:10:43 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-10-26 08:10:43 +0000
commit9726b596a71c97a891df6fcf98ff3f55d1aafc8f (patch)
tree6d6061a6d0998aa0a5951029c0bfeb324d866b8d /display.c
parent* [w3m-dev-en 00781] "Clemens Fischer" <ino-waiting@gmx.net> (diff)
downloadw3m-9726b596a71c97a891df6fcf98ff3f55d1aafc8f.tar.gz
w3m-9726b596a71c97a891df6fcf98ff3f55d1aafc8f.zip
[w3m-dev-en 00783] hsaka@mth.biglobe.ne.jp (Hironori SAKAMOTO)
add display_lineinfo option * display.c (displayBuffer): check displayLineInfo * fm.h (displayLineInfo): added * rc.c (CMT_DISPLINEINFO): added (display_lineinfo): added * NEWS (rc: display_lineinfo): add From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat (limited to 'display.c')
-rw-r--r--display.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/display.c b/display.c
index 02a2db3..c50cb74 100644
--- a/display.c
+++ b/display.c
@@ -1,4 +1,4 @@
-/* $Id: display.c,v 1.23 2002/10/25 19:59:51 ukai Exp $ */
+/* $Id: display.c,v 1.24 2002/10/26 08:10:43 ukai Exp $ */
#include <signal.h>
#include "fm.h"
@@ -318,13 +318,14 @@ displayBuffer(Buffer *buf, int mode)
else
#endif /* not USE_MOUSE */
msg = Strnew();
- Strcat_charp(msg, "Viewing");
- if (buf->currentLine != NULL && buf->lastLine != NULL)
- Strcat(msg, Sprintf(" %3d%%",
- (int)((double)buf->currentLine->real_linenumber
- * 100.0 /
- (double)buf->lastLine->real_linenumber
- + 0.5)));
+ if (displayLineInfo && buf->currentLine != NULL && buf->lastLine != NULL) {
+ int cl = buf->currentLine->real_linenumber;
+ int ll = buf->lastLine->real_linenumber;
+ int r = (int)((double)cl * 100.0 / (double)ll + 0.5);
+ Strcat(msg, Sprintf("%d/%d (%3d%%)", cl, ll, r));
+ }
+ else
+ Strcat_charp(msg, "Viewing");
#ifdef USE_SSL
if (buf->ssl_certificate)
Strcat_charp(msg, "[SSL]");