aboutsummaryrefslogtreecommitdiffstats
path: root/code/unix
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-01-22 01:58:50 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-01-22 01:58:50 +0000
commit670a7d99911d0663c5db663ed74019dbbb12a498 (patch)
tree047307e87cea2d216b1fd0a0cad92a591a5bd1e4 /code/unix
parentb411794fc8e0dc0e2d7ec044f813cfbe42bb8865 (diff)
downloadioquake3-aero-670a7d99911d0663c5db663ed74019dbbb12a498.tar.gz
ioquake3-aero-670a7d99911d0663c5db663ed74019dbbb12a498.zip
* 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
Diffstat (limited to 'code/unix')
-rw-r--r--code/unix/unix_main.c18
1 files changed, 1 insertions, 17 deletions
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;
}