diff --git a/app.go b/app.go index fe8f7a9f..62e351f1 100644 --- a/app.go +++ b/app.go @@ -430,7 +430,13 @@ func (app *app) loop() { } app.watchDir(d) - onLoad(app, d.fileNames()) + + paths := []string{} + for _, file := range d.allFiles { + paths = append(paths, file.path) + } + onLoad(app, paths) + app.ui.draw(app.nav) case r := <-app.nav.regChan: app.nav.regCache[r.path] = r diff --git a/nav.go b/nav.go index 3ed07484..b605c6a4 100644 --- a/nav.go +++ b/nav.go @@ -442,15 +442,6 @@ func (dir *dir) name() string { return dir.files[dir.ind].Name() } -func (d *dir) fileNames() []string { - names := []string{} - for _, file := range d.files { - names = append(names, file.path) - } - - return names -} - func (nav *nav) isVisualMode() bool { return nav.init && nav.currDir().visualAnchor != -1 }