mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 20:51:31 +00:00
Sortiere die Liste der uns bei Tab-Vervollständigung vorgeschlagenen
CVAR
This commit is contained in:
parent
66ac4643cb
commit
4ece83cd3c
1 changed files with 8 additions and 0 deletions
|
@ -315,6 +315,11 @@ Cmd_Exists ( char *cmd_name )
|
|||
return ( false );
|
||||
}
|
||||
|
||||
int qsort_strcomp ( const void *s1, const void *s2 )
|
||||
{
|
||||
return (strcmp(*(char **)s1, *(char **)s2));
|
||||
}
|
||||
|
||||
char *
|
||||
Cmd_CompleteCommand ( char *partial )
|
||||
{
|
||||
|
@ -399,6 +404,9 @@ Cmd_CompleteCommand ( char *partial )
|
|||
return ( pmatch [ 0 ] );
|
||||
}
|
||||
|
||||
/* Sort it */
|
||||
qsort(pmatch, i, sizeof(pmatch[0]), qsort_strcomp);
|
||||
|
||||
Com_Printf( "\n\n", partial );
|
||||
|
||||
for ( o = 0; o < i; o++ )
|
||||
|
|
Loading…
Reference in a new issue