summaryrefslogtreecommitdiff
path: root/src/fe-common/core/fe-help.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-03-19 12:28:55 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-03-19 12:28:55 +0000
commit753f3666aaaa00f6fee041819943a0f60ffd0560 (patch)
tree2600a14c77ca5e962b2433d22edba994917f839c /src/fe-common/core/fe-help.c
parent4c50a6e2f2d1e8db698264bdfbf8bc3ffecfc565 (diff)
downloadirssi-753f3666aaaa00f6fee041819943a0f60ffd0560.zip
Sort /HELP output better when using multiple categories. Patch by c0ffee.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2632 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core/fe-help.c')
-rw-r--r--src/fe-common/core/fe-help.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/fe-common/core/fe-help.c b/src/fe-common/core/fe-help.c
index fa90473d..c087771b 100644
--- a/src/fe-common/core/fe-help.c
+++ b/src/fe-common/core/fe-help.c
@@ -31,10 +31,17 @@
static int commands_equal(COMMAND_REC *rec, COMMAND_REC *rec2)
{
+ int i;
+
if (rec->category == NULL && rec2->category != NULL)
return -1;
if (rec2->category == NULL && rec->category != NULL)
return 1;
+ if (rec->category != NULL && rec2->category != NULL) {
+ i = strcmp(rec->category, rec2->category);
+ if (i != 0)
+ return i;
+ }
return strcmp(rec->cmd, rec2->cmd);
}