From 79b874e147b7dfcc1def25864726793c1704cd75 Mon Sep 17 00:00:00 2001 From: Olivier Perret Date: Mon, 26 Dec 2016 21:47:27 +0100 Subject: [PATCH] include first item in reverse search (#54) --- nav.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nav.go b/nav.go index 863d499..4dc2d43 100644 --- a/nav.go +++ b/nav.go @@ -365,7 +365,7 @@ func (nav *nav) searchNext() { func (nav *nav) searchPrev() { last := nav.currDir() - for i := last.ind - 1; i > 0; i-- { + for i := last.ind - 1; i >= 0; i-- { if strings.Contains(last.fi[i].Name(), nav.search) { nav.up(last.ind - i) return