Make search more robust

This commit is contained in:
erroneousboat 2017-12-17 14:25:39 +01:00
parent d66673d4b6
commit c9884997ec

View File

@ -211,9 +211,11 @@ func (c *Channels) Search(term string) {
} }
} }
if len(c.SearchMatches) > 0 {
c.GotoPosition(0) c.GotoPosition(0)
c.SearchPosition = 0 c.SearchPosition = 0
} }
}
// GotoPosition is used by the search functionality to automatically // GotoPosition is used by the search functionality to automatically
// scroll to a specific location in the channels component // scroll to a specific location in the channels component