Do not sort the result if query is empty

pull/4/head
Junegunn Choi 11 years ago
parent ddf6e5ef1e
commit 8a0a3f9bf5

2
fzf

@ -429,7 +429,7 @@ searcher = Thread.new {
end
mcount = matches.length
if @sort && mcount <= @sort
if @sort && mcount <= @sort && !q.empty?
matches.replace matches.sort_by { |triple|
line, b, e = triple
[b ? (e - b) : 0, line.length, line]

Loading…
Cancel
Save