From: Jonas Fonseca Date: Sun, 4 Jun 2006 00:46:30 +0000 (+0200) Subject: Make the view title show percentage shown like less X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6d9c07af4db59e73d6f434f1ade4da919601f96c;p=tig.git Make the view title show percentage shown like less The cursor position is already summoned up as "line x of X". --- diff --git a/tig.c b/tig.c index 0f77167..1f36682 100644 --- a/tig.c +++ b/tig.c @@ -867,8 +867,9 @@ update_view_title(struct view *view) 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%%)",