diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2015-01-15 06:06:22 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-01-15 06:06:22 +0900 |
| commit | 62acb9adc47e714a427f12cb2e2c6ebca0bd7f38 (patch) | |
| tree | 92984eba009f04dbb917c3d29b9a122b10dc805a | |
| parent | 0b5fa56444350c575ed6aeb0d1d0ec35f61c00c2 (diff) | |
| download | fzf-62acb9adc47e714a427f12cb2e2c6ebca0bd7f38.tar.gz | |
Fix error with empty list and release 0.9.1-dev
| -rwxr-xr-x | install | 4 | ||||
| -rw-r--r-- | src/constants.go | 2 | ||||
| -rw-r--r-- | src/terminal.go | 3 |
3 files changed, 5 insertions, 4 deletions
@@ -1,6 +1,6 @@ #!/usr/bin/env bash -version=0.9.0 +version=0.9.1-dev cd $(dirname $BASH_SOURCE) fzf_base=$(pwd) @@ -33,7 +33,7 @@ symlink() { download() { echo "Downloading bin/fzf ..." - if [ -x "$fzf_base"/bin/fzf ]; then + if [[ ! $1 =~ dev && -x "$fzf_base"/bin/fzf ]]; then echo " - Already exists" check_binary && return elif [ -x "$fzf_base"/bin/$1 ]; then diff --git a/src/constants.go b/src/constants.go index a8715700..c3d85755 100644 --- a/src/constants.go +++ b/src/constants.go @@ -5,7 +5,7 @@ import ( ) // Current version -const Version = "0.9.0" +const Version = "0.9.1-dev" // fzf events const ( diff --git a/src/terminal.go b/src/terminal.go index 4204a1da..44796cec 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -134,7 +134,8 @@ func (t *Terminal) output() { fmt.Println(string(t.input)) } if len(t.selected) == 0 { - if t.merger.Length() > t.cy { + cnt := t.merger.Length() + if cnt > 0 && cnt > t.cy { fmt.Println(t.merger.Get(t.listIndex(t.cy)).AsString()) } } else { |
