fix crash for 'bottom' at startup

Related #498
This commit is contained in:
Gokcehan 2020-11-06 20:51:31 +03:00
parent 8eb596c670
commit 70ec01fc3b

1
nav.go
View File

@ -252,6 +252,7 @@ func (dir *dir) sel(name string, height int) {
return
}
dir.ind = max(dir.ind, 0)
dir.ind = min(dir.ind, len(dir.files)-1)
if dir.files[dir.ind].Name() != name {