X-Git-Url: https://git.distorted.org.uk/~mdw/tig/blobdiff_plain/e0f50df03cabbf7edb97b271115d033277c34690..421ab13a2aa652d6b07ecc1a270a8b1ce5be451d:/tig.c diff --git a/tig.c b/tig.c index 6adfb33..fa2a708 100644 --- a/tig.c +++ b/tig.c @@ -1153,7 +1153,7 @@ read_option(char *opt, size_t optlen, char *value, size_t valuelen) if (status == ERR) { fprintf(stderr, "Error on line %d, near '%.*s': %s\n", - config_lineno, optlen, opt, config_msg); + config_lineno, (int) optlen, opt, config_msg); config_errors = TRUE; } @@ -1289,8 +1289,8 @@ static struct view views[] = { VIEW_(LOG, "log", &pager_ops, ref_head), VIEW_(TREE, "tree", &tree_ops, ref_commit), VIEW_(BLOB, "blob", &blob_ops, ref_blob), - VIEW_(HELP, "help", &help_ops, ""), - VIEW_(PAGER, "pager", &pager_ops, ""), + VIEW_(HELP, "help", &help_ops, ""), + VIEW_(PAGER, "pager", &pager_ops, "stdin"), VIEW_(STATUS, "status", &status_ops, ""), }; @@ -1394,7 +1394,7 @@ update_view_title(struct view *view) if (minsize < view->width) refsize = view->width - minsize + 7; - string_format_from(buf, &bufpos, " %.*s", refsize, view->ref); + string_format_from(buf, &bufpos, " %.*s", (int) refsize, view->ref); } if (statelen && bufpos < view->width) { @@ -2152,7 +2152,7 @@ view_driver(struct view *view, enum request request) break; case REQ_VIEW_PAGER: - if (!VIEW(REQ_VIEW_PAGER)->lines) { + if (!opt_pipe && !VIEW(REQ_VIEW_PAGER)->lines) { report("No pager content, press %s to run command from prompt", get_key(REQ_PROMPT)); break;