chiark
/
gitweb
/
~mdw
/
tig
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
201f10e
)
Ignore REQ_NONE in the help view and improve unbound request handling
author
Jonas Fonseca
<fonseca@diku.dk>
Thu, 27 Sep 2007 02:12:55 +0000
(
04:12
+0200)
committer
Jonas Fonseca
<fonseca@diku.dk>
Thu, 27 Sep 2007 18:17:28 +0000
(20:17 +0200)
tig.c
patch
|
blob
|
blame
|
history
diff --git
a/tig.c
b/tig.c
index 7c4afae8cdd4632369076e4e52a78775ce8f9beb..3a9bc2d0b83e185165917ee2425f6e2caca1a96f 100644
(file)
--- 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;