From b4ca76693c2a49f5339e0c6babe683bb93d00c73 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Sun, 17 Apr 2016 22:11:05 -0400 Subject: [PATCH] Don't search if the search string is empty Fixes #6 --- src/search.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/search.go b/src/search.go index 2357c59b..f5efce61 100644 --- a/src/search.go +++ b/src/search.go @@ -67,6 +67,9 @@ func HandleSearchEvent(event tcell.Event, v *View) { // specifies whether it should search down from the searchStart position // or up from there func Search(searchStr string, v *View, down bool) { + if searchStr == "" { + return + } var str string var charPos int if down {