mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-25 22:27:41 +00:00
Fix error on Rubinius
This commit is contained in:
parent
bff7e9edf5
commit
39eb85596c
5
fzf
5
fzf
@ -556,8 +556,7 @@ class FZF
|
|||||||
if new_search && !lists.empty?
|
if new_search && !lists.empty?
|
||||||
q, cx = events.delete(:key) || [q, 0]
|
q, cx = events.delete(:key) || [q, 0]
|
||||||
empty = matcher.empty?(q)
|
empty = matcher.empty?(q)
|
||||||
matches = fcache[q] ||=
|
unless matches = fcache[q]
|
||||||
begin
|
|
||||||
found = []
|
found = []
|
||||||
skip = false
|
skip = false
|
||||||
cnt = 0
|
cnt = 0
|
||||||
@ -574,7 +573,7 @@ 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
|
||||||
@sort ? found : found.reverse
|
matches = fcache[q] = @sort ? found : found.reverse
|
||||||
end
|
end
|
||||||
|
|
||||||
if !empty && @sort && matches.length <= @sort
|
if !empty && @sort && matches.length <= @sort
|
||||||
|
Loading…
Reference in New Issue
Block a user