keep cache when navigation is renewed
This commit is contained in:
parent
7acc85f81c
commit
e025c68130
5
nav.go
5
nav.go
@ -281,11 +281,6 @@ func newNav(height int) *nav {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (nav *nav) renew() {
|
func (nav *nav) renew() {
|
||||||
nav.dirCache = make(map[string]*dir)
|
|
||||||
for _, d := range nav.dirs {
|
|
||||||
nav.dirCache[d.path] = d
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, d := range nav.dirs {
|
for _, d := range nav.dirs {
|
||||||
go func(d *dir) {
|
go func(d *dir) {
|
||||||
s, err := os.Stat(d.path)
|
s, err := os.Stat(d.path)
|
||||||
|
Loading…
Reference in New Issue
Block a user