From 8a0a3f9bf552ce4d6970048f9d4c70222679de58 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 10 Nov 2013 03:57:10 +0900 Subject: [PATCH] Do not sort the result if query is empty --- fzf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fzf b/fzf index 13355e8..60bfdaa 100755 --- a/fzf +++ b/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]