Do not sort the result if query is empty
This commit is contained in:
parent
ddf6e5ef1e
commit
8a0a3f9bf5
2
fzf
2
fzf
@ -429,7 +429,7 @@ searcher = Thread.new {
|
|||||||
end
|
end
|
||||||
|
|
||||||
mcount = matches.length
|
mcount = matches.length
|
||||||
if @sort && mcount <= @sort
|
if @sort && mcount <= @sort && !q.empty?
|
||||||
matches.replace matches.sort_by { |triple|
|
matches.replace matches.sort_by { |triple|
|
||||||
line, b, e = triple
|
line, b, e = triple
|
||||||
[b ? (e - b) : 0, line.length, line]
|
[b ? (e - b) : 0, line.length, line]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user