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 {