diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2013-11-01 01:59:23 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2013-11-01 01:59:23 +0900 |
| commit | b98fba4cf10d2ca03d4dd47ef2d803cd9982e392 (patch) | |
| tree | 2f911c91cf23ca0dabc1ec443da57c1712db5cc7 | |
| parent | a03b5c8c42bef6ebb99c1bb3dfb1ed93faf83dbb (diff) | |
| download | fzf-b98fba4cf10d2ca03d4dd47ef2d803cd9982e392.tar.gz | |
Gradually increase delay upto 0.2 seconds
| -rwxr-xr-x | fzf | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -295,7 +295,7 @@ searcher = Thread.new { q = '' vcursor = 0 zz = [0, 0] - started = false + delay = 0.0 begin while true @@ -396,10 +396,7 @@ searcher = Thread.new { end#new_search # This small delay reduces the number of partial lists - if started && !user_input - sleep 0.2 - end - started = true + sleep [0.2, delay += 0.05].min unless user_input if events.delete(:vcursor) || new_search @mtx.synchronize do |
