mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-03 05:32:08 -07:00
Do not use defer in performance-sensitive contexts
This commit is contained in:
@@ -205,7 +205,6 @@ func Run(opts *Options, revision string) {
|
||||
delay := true
|
||||
ticks++
|
||||
eventBox.Wait(func(events *util.Events) {
|
||||
defer events.Clear()
|
||||
for evt, value := range *events {
|
||||
switch evt {
|
||||
|
||||
@@ -265,6 +264,7 @@ func Run(opts *Options, revision string) {
|
||||
}
|
||||
}
|
||||
}
|
||||
events.Clear()
|
||||
})
|
||||
if delay && reading {
|
||||
dur := util.DurWithin(
|
||||
|
Reference in New Issue
Block a user