Fix recent command update
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
d4da7e3621
commit
8236bb37f0
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue