From fba0552f874e6053238a9aefdced65eb2f14d26a Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sat, 25 Aug 2012 14:57:06 -0700 Subject: Added recording history of used commands into file 'abc.history' (Windows only). --- src/base/cmd/cmdHist.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/base/cmd/cmdHist.c b/src/base/cmd/cmdHist.c index 5885b1b5..29a51452 100644 --- a/src/base/cmd/cmdHist.c +++ b/src/base/cmd/cmdHist.c @@ -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 ); + } } } -- cgit v1.2.3