Add on-load command (#2010)
This commit is contained in:
1 parent
b76d2546e1
commit
ff0c7f1c96
6 files changed
+47
-3
No files matched your search
@@ -43,7 +43,6 @@ type file struct {
|
||||
|
||||
func newFile(path string) *file {
|
||||
lstat, err := os.Lstat(path)
|
||||
|
||||
if err != nil {
|
||||
log.Printf("getting file information: %s", err)
|
||||
return &file{
|
||||
@@ -388,6 +387,15 @@ 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 (dir *dir) sel(name string, height int) {
|
||||
if len(dir.files) == 0 {
|
||||
dir.ind, dir.pos = 0, 0
|
||||
|
||||
Reference in new issue
Block a user