2
0
Fork 0
mirror of https://github.com/Shpoike/Quakespasm.git synced 2025-03-14 14:52:05 +00:00

console.c: fix skipping of first match when tab-completing

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@758 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
svdijk 2012-10-01 03:55:45 +00:00
parent 427c0b923c
commit 74b2dbc5e3

View file

@ -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