Added recording history of used commands into file 'abc.history' (Windows only).

This commit is contained in:
Alan Mishchenko 2012-08-25 14:57:06 -07:00
parent bffbd05a2f
commit fba0552f87
1 changed files with 6 additions and 1 deletions

View File

@ -67,10 +67,15 @@ void Cmd_HistoryAddCommand( Abc_Frame_t * p, const char * command )
if ( !strcmp(pStr, Buffer) )
break;
if ( i == Vec_PtrSize(p->aHistory) )
{
{ // add new entry
Vec_PtrPush( p->aHistory, Extra_UtilStrsav(Buffer) );
Cmd_HistoryWrite( p, nLastSaved );
}
else
{ // put at the end
Vec_PtrRemove( p->aHistory, pStr );
Vec_PtrPush( p->aHistory, pStr );
}
}
}