From f357041757ca351908dd57b3d05d880a1c546716 Mon Sep 17 00:00:00 2001 From: tma Date: Fri, 21 Oct 2005 19:52:52 +0000 Subject: * Tab completed commands no longer treated like cvars git-svn-id: svn://svn.icculus.org/quake3/trunk@173 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/qcommon/common.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'code/qcommon') diff --git a/code/qcommon/common.c b/code/qcommon/common.c index 439acca..ac9b210 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -3209,11 +3209,23 @@ static void FindMatches( const char *s ) { /* =============== -PrintMatches +PrintCmdMatches =============== */ -static void PrintMatches( const char *s ) { +static void PrintCmdMatches( const char *s ) { + if ( !Q_stricmpn( s, shortestMatch, strlen( shortestMatch ) ) ) { + Com_Printf( " %s\n", s ); + } +} + +/* +=============== +PrintCvarMatches + +=============== +*/ +static void PrintCvarMatches( const char *s ) { if ( !Q_stricmpn( s, shortestMatch, strlen( shortestMatch ) ) ) { Com_Printf( " %s = \"%s\"\n", s, Cvar_VariableString( s ) ); } @@ -3309,6 +3321,6 @@ void Field_CompleteCommand( field_t *field ) { Com_Printf( "]%s\n", completionField->buffer ); // run through again, printing matches - Cmd_CommandCompletion( PrintMatches ); - Cvar_CommandCompletion( PrintMatches ); + Cmd_CommandCompletion( PrintCmdMatches ); + Cvar_CommandCompletion( PrintCvarMatches ); } -- cgit v1.2.3