X-Git-Url: https://git.distorted.org.uk/~mdw/tig/blobdiff_plain/54efb62b1e6a270db94f9395e9934aec002eee3e..cdfc29adc50d13fc90b21eda3ce4795513a42f8f:/tig.c diff --git a/tig.c b/tig.c index 0f77167..b827a92 100644 --- a/tig.c +++ b/tig.c @@ -418,7 +418,7 @@ parse_options(int argc, char *argv[]) if (opt[0] && opt[0] != '-') break; - die("unknown command '%s'", opt); + die("unknown option '%s'\n\n%s", opt, usage); } if (!isatty(STDIN_FILENO)) { @@ -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%%)",