diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2014-06-15 18:35:47 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2014-06-15 18:35:47 +0900 |
commit | 61ba8d5a11fc1672d1601ae246817f9b3eb29404 (patch) | |
tree | 4411041c113453090dd4220548d0c861fdaf2576 | |
parent | 4a3a5ee70daeca7c9d361ef92bf77305e1927211 (diff) |
Add a small delay when search is interrupted0.8.5
Search is interrupted when the query string has changed. This frequently
happens when the user is actively typing in a query. This (rather
arbitrary) delay is introduced not to start the next search immediately,
which is likely to be interrupted as well. The result of it is that fzf
feels more responsive.
-rwxr-xr-x | fzf | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -7,7 +7,7 @@ # / __/ / /_/ __/ # /_/ /___/_/ Fuzzy finder for your shell # -# Version: 0.8.5 (Jun 14, 2014) +# Version: 0.8.5 (Jun 15, 2014) # # Author: Junegunn Choi # URL: https://github.com/junegunn/fzf @@ -629,7 +629,10 @@ class FZF found.concat(q.empty? ? list : matcher.match(list, q, q[0, cx], q[cx..-1])) end - next if skip + if skip + sleep 0.1 + next + end matches = @sort ? found : found.reverse if !empty && @sort && matches.length <= @sort matches = FZF.sort(matches) |