diff options
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/dirlist.go | 2 | ||||
-rw-r--r-- | widgets/dirtree.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/widgets/dirlist.go b/widgets/dirlist.go index 70550394..0f8431e9 100644 --- a/widgets/dirlist.go +++ b/widgets/dirlist.go @@ -131,7 +131,7 @@ func (dirlist *DirectoryList) UpdateList(done func(dirs []string)) { dirlist.spinner.Stop() dirlist.Invalidate() if done != nil { - done(dirs) + done(dirlist.dirs) } } }) diff --git a/widgets/dirtree.go b/widgets/dirtree.go index 3e419d47..f475255f 100644 --- a/widgets/dirtree.go +++ b/widgets/dirtree.go @@ -59,7 +59,7 @@ func (dt *DirectoryTree) Draw(ctx *ui.Context) { } n := dt.countVisible(dt.list) - if n == 0 { + if n == 0 || dt.listIdx < 0 { style := dt.UiConfig("").GetStyle(config.STYLE_DIRLIST_DEFAULT) ctx.Printf(0, 0, style, dt.UiConfig("").EmptyDirlist) return |