load directories asynchronously

Mentioned in #92.
This commit is contained in:
Gokcehan committed 2018-01-11 19:25:48 +03:00
1 parent ec8e75ba30
commit 2b4c0f913b
3 files changed
+60 -11

No files matched your search

+6
View File
@@ -246,6 +246,12 @@ func (win *win) printDir(dir *dir, marks map[string]int, saves map[string]bool)
fg, bg := termbox.ColorDefault, termbox.ColorDefault
if dir.loading {
fg = termbox.AttrBold
win.print(2, 0, fg, bg, "loading...")
return
}
if len(dir.fi) == 0 {
fg = termbox.AttrBold
win.print(2, 0, fg, bg, "empty")