mirror of
https://github.com/irssi/irssi.git
synced 2025-01-03 14:56:47 -05:00
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
This commit is contained in:
parent
4c50a6e2f2
commit
753f3666aa
@ -31,10 +31,17 @@
|
|||||||
|
|
||||||
static int commands_equal(COMMAND_REC *rec, COMMAND_REC *rec2)
|
static int commands_equal(COMMAND_REC *rec, COMMAND_REC *rec2)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
if (rec->category == NULL && rec2->category != NULL)
|
if (rec->category == NULL && rec2->category != NULL)
|
||||||
return -1;
|
return -1;
|
||||||
if (rec2->category == NULL && rec->category != NULL)
|
if (rec2->category == NULL && rec->category != NULL)
|
||||||
return 1;
|
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);
|
return strcmp(rec->cmd, rec2->cmd);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user