summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 54efb62)
raw | patch | inline | side by side (parent: 54efb62)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 4 Jun 2006 00:46:30 +0000 (02:46 +0200) | ||
committer | Jonas Fonseca Madsen <fonseca@ask.diku.dk> | |
Sun, 4 Jun 2006 00:46:30 +0000 (02:46 +0200) |
The cursor position is already summoned up as "line x of X".
tig.c | patch | blob | history |
index 0f77167fbdfa40f55ac8a34dcc813dc5d686554d..1f36682b28fde0bcc859b07f9741156170704d4e 100644 (file)
--- a/tig.c
+++ b/tig.c
wprintw(view->title, "[%s]", view->name);
if (view->lines || view->pipe) {
+ unsigned int view_lines = view->offset + view->height;
unsigned int lines = view->lines
- ? (view->lineno + 1) * 100 / view->lines
+ ? MIN(view_lines, view->lines) * 100 / view->lines
: 0;
wprintw(view->title, " - %s %d of %d (%d%%)",