mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-22 21:05:09 +00:00
Cache the result as sorted
This commit is contained in:
parent
301290663d
commit
089691faaf
10
fzf
10
fzf
@ -642,11 +642,11 @@ class FZF
|
|||||||
matcher.match(list, q, q[0, cx], q[cx..-1]))
|
matcher.match(list, q, q[0, cx], q[cx..-1]))
|
||||||
end
|
end
|
||||||
next if skip
|
next if skip
|
||||||
matches = fcache[q] = @sort ? found : found.reverse
|
matches = @sort ? found : found.reverse
|
||||||
end
|
if !empty && @sort && matches.length <= @sort
|
||||||
|
matches = sort_by_rank(matches)
|
||||||
if !empty && @sort && matches.length <= @sort
|
end
|
||||||
matches = sort_by_rank(matches)
|
fcache[q] = matches
|
||||||
end
|
end
|
||||||
|
|
||||||
# Atomic update
|
# Atomic update
|
||||||
|
Loading…
Reference in New Issue
Block a user