Skip to content

Commit

Permalink
Tab completion for the viewpos command (ported ironwail 6bde823)
Browse files Browse the repository at this point in the history
  • Loading branch information
timbergeron committed Nov 29, 2023
1 parent 61add8d commit f2da843
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Quake/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,15 @@ static qboolean CompleteUnbindKeys (const char* partial, void* unused) // woods
return true;
}

static qboolean CompleteViewpos (const char* partial, void* unused) // woods
{
if (Cmd_Argc() != 2)
return;
Con_AddToTabList("copy", partial, NULL);

return true;
}

qboolean CompleteImageList (const char* partial, void* unused); // woods

typedef struct arg_completion_type_s // woods #iwtabcomplete
Expand Down Expand Up @@ -1433,6 +1442,7 @@ static const arg_completion_type_t arg_completion_types[] =
{ "imagedump", CompleteImageList, NULL },
{ "bind", CompleteBindKeys, NULL },
{ "unbind", CompleteUnbindKeys, NULL },
{ "viewpos", CompleteViewpos, NULL },
};

static const int num_arg_completion_types =
Expand Down

0 comments on commit f2da843

Please sign in to comment.