mirror of
https://github.com/junegunn/fzf.git
synced 2026-02-28 12:32:34 +08:00
Add generic utils constraint function
This commit is contained in:
committed by
Junegunn Choi
parent
14b5e1d88c
commit
6eb4b41e34
@@ -530,7 +530,7 @@ func Run(opts *Options) (int, error) {
|
||||
break
|
||||
}
|
||||
if delay && reading {
|
||||
dur := util.DurWithin(
|
||||
dur := util.Constrain(
|
||||
time.Duration(ticks-startTick)*coordinatorDelayStep,
|
||||
0, coordinatorDelayMax)
|
||||
time.Sleep(dur)
|
||||
|
||||
Reference in New Issue
Block a user