From 0e4360b62504f1f96754744fa1bb66c340a17955 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Thu, 27 Sep 2007 04:12:55 +0200 Subject: [PATCH] Ignore REQ_NONE in the help view and improve unbound request handling --- tig.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 2.32.0.93.g670b81a890