Pass all files for on-load hook command (#2077)
This commit is contained in:
1 parent
9183e81f7f
commit
88a599643d
2 files changed
+7
-10
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user