about summary refs log tree commit diff stats
path: root/cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmds.c')
-rw-r--r--cmds.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmds.c b/cmds.c
index ec7efa6..07707df 100644
--- a/cmds.c
+++ b/cmds.c
@@ -55,6 +55,7 @@ int search(const void *s1, const void *s2) {
 void init_state(state *s) {
   int numel = sizeof(CMD_LIST)/sizeof(CMD_LIST[0]);
   qsort(&CMD_LIST, numel, sizeof(CMD_LIST[0]), compare);
+  s->numel = numel;
   s->sorted = CMD_LIST;
 }