diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2013-11-16 00:31:22 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2013-11-16 00:31:22 +0900 |
commit | 76c7f4f9c0d1a28986f3f2f3cc30116a136681c4 (patch) | |
tree | 685cf9a83a836faa6ddd097be9a30911ddc507d1 | |
parent | 8ae604af677272f13d286dc0899feb6276eec5ac (diff) |
Do not include highlighted item when items chosen
-rwxr-xr-x | fzf | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -10,7 +10,7 @@ # URL: https://github.com/junegunn/fzf # Author: Junegunn Choi # License: MIT -# Last update: November 15, 2013 +# Last update: November 16, 2013 # # Copyright (c) 2013 Junegunn Choi # @@ -677,11 +677,13 @@ class FZF ensure C.close_screen if got - @selects.delete got - @selects.each do |sel, _| - @stdout.puts sel + if @selects.empty? + @stdout.puts got + else + @selects.each do |sel, _| + @stdout.puts sel + end end - @stdout.puts got end end end |