From: Jonas Fonseca Date: Thu, 27 Sep 2007 02:12:55 +0000 (+0200) Subject: Ignore REQ_NONE in the help view and improve unbound request handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0e4360b62504f1f96754744fa1bb66c340a17955;p=tig.git Ignore REQ_NONE in the help view and improve unbound request handling --- diff --git a/tig.c b/tig.c index 7c4afae..3a9bc2d 100644 --- a/tig.c +++ b/tig.c @@ -2640,6 +2640,9 @@ help_open(struct view *view) for (i = 0; i < ARRAY_SIZE(req_info); i++) { char *key; + if (req_info[i].request == REQ_NONE) + continue; + if (!req_info[i].request) { add_line_text(view, "", LINE_DEFAULT); add_line_text(view, req_info[i].help, LINE_DEFAULT); @@ -2647,6 +2650,9 @@ help_open(struct view *view) } key = get_key(req_info[i].request); + if (!*key) + key = "(no key defined)"; + if (!string_format(buf, " %-25s %s", key, req_info[i].help)) continue;