From 62acb9adc47e714a427f12cb2e2c6ebca0bd7f38 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 15 Jan 2015 06:06:22 +0900 Subject: Fix error with empty list and release 0.9.1-dev --- src/constants.go | 2 +- src/terminal.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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 { -- cgit v1.2.3