Don't search if the search string is empty

Fixes #6
This commit is contained in:
Zachary Yedidia
2016-04-17 22:11:05 -04:00
parent d87a3eb3ce
commit b4ca76693c

View File

@@ -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 {