Fix recent command update
continuous-integration/drone/push Build is passing Details

This commit is contained in:
SeraphJACK 2023-10-12 15:56:04 +08:00
parent d4da7e3621
commit 8236bb37f0
1 changed files with 2 additions and 2 deletions

View File

@ -28,9 +28,9 @@ func (r recentCmdSort) Swap(i, j int) {
func updateRecentCommand(command string) {
exists := false
for _, v := range recentCmds {
for idx, v := range recentCmds {
if v.command == command {
v.t = time.Now()
recentCmds[idx].t = time.Now()
exists = true
break
}