mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
console.c: fix skipping of first match when tab-completing
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@758 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
4ba7ad73b6
commit
892aa73db0
1 changed files with 4 additions and 3 deletions
|
@ -1012,15 +1012,16 @@ void Con_TabComplete (void)
|
|||
|
||||
//find current match -- can't save a pointer because the list will be rebuilt each time
|
||||
t = tablist;
|
||||
match = keydown[K_SHIFT] ? t->prev->name : t->name;
|
||||
do
|
||||
{
|
||||
if (!Q_strcmp(t->name, partial))
|
||||
{
|
||||
match = keydown[K_SHIFT] ? t->prev->name : t->next->name;
|
||||
break;
|
||||
}
|
||||
t = t->next;
|
||||
} while (t != tablist);
|
||||
|
||||
//use prev or next to find next match
|
||||
match = keydown[K_SHIFT] ? t->prev->name : t->next->name;
|
||||
}
|
||||
Hunk_FreeToLowMark(mark); //it's okay to free it here because match is a pointer to persistent data
|
||||
|
||||
|
|
Loading…
Reference in a new issue