diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-08-25 14:57:06 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-08-25 14:57:06 -0700 |
commit | fba0552f874e6053238a9aefdced65eb2f14d26a (patch) | |
tree | 5e03019639dacdbd2bb5e75cfb8edc1a7b3a7f39 | |
parent | bffbd05a2f56d96df2485fad7b224e018a3a6d5f (diff) | |
download | abc-fba0552f874e6053238a9aefdced65eb2f14d26a.tar.gz abc-fba0552f874e6053238a9aefdced65eb2f14d26a.tar.bz2 abc-fba0552f874e6053238a9aefdced65eb2f14d26a.zip |
Added recording history of used commands into file 'abc.history' (Windows only).
-rw-r--r-- | src/base/cmd/cmdHist.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 ); + } } } |