From c9884997ec93c5ba576e76bdcfb522512b38c147 Mon Sep 17 00:00:00 2001 From: erroneousboat Date: Sun, 17 Dec 2017 14:25:39 +0100 Subject: [PATCH] Make search more robust --- components/channels.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/channels.go b/components/channels.go index 775d247..2342932 100644 --- a/components/channels.go +++ b/components/channels.go @@ -211,8 +211,10 @@ func (c *Channels) Search(term string) { } } - c.GotoPosition(0) - c.SearchPosition = 0 + if len(c.SearchMatches) > 0 { + c.GotoPosition(0) + c.SearchPosition = 0 + } } // GotoPosition is used by the search functionality to automatically