From f2da843046431e01ae6d67f9a94ee6a87d95b6d3 Mon Sep 17 00:00:00 2001 From: timbergeron Date: Tue, 28 Nov 2023 22:21:05 -0800 Subject: [PATCH] Tab completion for the viewpos command (ported ironwail 6bde823) --- Quake/console.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Quake/console.c b/Quake/console.c index 51d15a48..de941e4a 100644 --- a/Quake/console.c +++ b/Quake/console.c @@ -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 @@ -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 =