diff options
Diffstat (limited to 'theMagicOfAutocomplete.go')
| -rw-r--r-- | theMagicOfAutocomplete.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/theMagicOfAutocomplete.go b/theMagicOfAutocomplete.go index 79154e9..95585bd 100644 --- a/theMagicOfAutocomplete.go +++ b/theMagicOfAutocomplete.go @@ -116,6 +116,8 @@ func prepareStdout() { func savePB() { // save now. this is near the end probably + dur := time.Since(PB.Ctime.AsTime()) + me.pb.ArgvDuration = durationpb.New(dur) // track how long autocomplete took me.all.Append(me.pb) // npb := new(Argv) // npb.Uuid = uuid.New().String() @@ -155,7 +157,6 @@ func saveAndExit() { } // sets me.last -// computes me.pb.Duration func examineArgvHistory() { me.all = NewArgvs() // loads the argv autocomplete history file @@ -243,7 +244,7 @@ func examineArgvHistory() { me.pb.Fast = 0 } // user keeps hitting tab. trigger help - if me.pb.Duration.AsDuration() < time.Millisecond*300 { + if dur < time.Millisecond*300 { me.pb.Fast = me.last.Fast + 1 } else { me.pb.Fast = 0 |
