include first item in reverse search (#54)

This commit is contained in:
Olivier Perret 2016-12-26 21:47:27 +01:00 committed by gokcehan
parent ad6ead5e45
commit 79b874e147

2
nav.go
View File

@ -365,7 +365,7 @@ func (nav *nav) searchNext() {
func (nav *nav) searchPrev() { func (nav *nav) searchPrev() {
last := nav.currDir() 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) { if strings.Contains(last.fi[i].Name(), nav.search) {
nav.up(last.ind - i) nav.up(last.ind - i)
return return