From 670a7d99911d0663c5db663ed74019dbbb12a498 Mon Sep 17 00:00:00 2001 From: tma Date: Sun, 22 Jan 2006 01:58:50 +0000 Subject: * Overhaul of console autocompletion - No longer does weird stuff like move the cursor inappropriately - Autocomplete works with compound commands - Special autocomplete on some commands e.g. \map, \demo - Removed various hacks used to counter the original autocomplete code git-svn-id: svn://svn.icculus.org/quake3/trunk@514 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/unix/unix_main.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'code/unix') diff --git a/code/unix/unix_main.c b/code/unix/unix_main.c index 4216b1c..8cd0886 100644 --- a/code/unix/unix_main.c +++ b/code/unix/unix_main.c @@ -549,7 +549,6 @@ char *Sys_ConsoleInput(void) { // we use this when sending back commands static char text[256]; - int i; int avail; char key; field_t *history; @@ -588,22 +587,7 @@ char *Sys_ConsoleInput(void) if (key == '\t') { tty_Hide(); - Field_CompleteCommand( &tty_con ); - // Field_CompleteCommand does weird things to the string, do a cleanup - // it adds a '\' at the beginning of the string - // cursor doesn't reflect actual length of the string that's sent back - tty_con.cursor = strlen(tty_con.buffer); - if (tty_con.cursor>0) - { - if (tty_con.buffer[0] == '\\') - { - for (i=0; i<=tty_con.cursor; i++) - { - tty_con.buffer[i] = tty_con.buffer[i+1]; - } - tty_con.cursor--; - } - } + Field_AutoComplete( &tty_con ); tty_Show(); return NULL; } -- cgit v1.2.3