mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2025-01-09 09:50:26 +00:00
Gradually increase delay upto 0.2 seconds
This commit is contained in:
parent
a03b5c8c42
commit
b98fba4cf1
7
fzf
7
fzf
@ -295,7 +295,7 @@ searcher = Thread.new {
|
|||||||
q = ''
|
q = ''
|
||||||
vcursor = 0
|
vcursor = 0
|
||||||
zz = [0, 0]
|
zz = [0, 0]
|
||||||
started = false
|
delay = 0.0
|
||||||
|
|
||||||
begin
|
begin
|
||||||
while true
|
while true
|
||||||
@ -396,10 +396,7 @@ searcher = Thread.new {
|
|||||||
end#new_search
|
end#new_search
|
||||||
|
|
||||||
# This small delay reduces the number of partial lists
|
# This small delay reduces the number of partial lists
|
||||||
if started && !user_input
|
sleep [0.2, delay += 0.05].min unless user_input
|
||||||
sleep 0.2
|
|
||||||
end
|
|
||||||
started = true
|
|
||||||
|
|
||||||
if events.delete(:vcursor) || new_search
|
if events.delete(:vcursor) || new_search
|
||||||
@mtx.synchronize do
|
@mtx.synchronize do
|
||||||
|
Loading…
Reference in New Issue
Block a user