Skip to content

Commit

Permalink
Fix error with empty list and release 0.9.1-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
junegunn committed Jan 14, 2015
1 parent 0b5fa56 commit 62acb9a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions install
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

version=0.9.0
version=0.9.1-dev

cd $(dirname $BASH_SOURCE)
fzf_base=$(pwd)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
)

// Current version
const Version = "0.9.0"
const Version = "0.9.1-dev"

// fzf events
const (
Expand Down
3 changes: 2 additions & 1 deletion src/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 62acb9a

Please sign in to comment.