diff options
-rw-r--r-- | widgets/dirlist.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/widgets/dirlist.go b/widgets/dirlist.go index 11e1b208..b6c09dda 100644 --- a/widgets/dirlist.go +++ b/widgets/dirlist.go @@ -133,6 +133,12 @@ func (dirlist *DirectoryList) Select(name string) { select { case <-time.After(dirlist.UiConfig().DirListDelay): + newStore := true + for _, s := range dirlist.store.List() { + if s == dirlist.selecting { + newStore = false + } + } dirlist.worker.PostAction(&types.OpenDirectory{Directory: name}, func(msg types.WorkerMessage) { switch msg.(type) { @@ -156,6 +162,9 @@ func (dirlist *DirectoryList) Select(name string) { sort.Strings(dirlist.dirs) } dirlist.sortDirsByFoldersSortConfig() + if newStore { + dirlist.worker.PostAction(&types.FetchDirectoryContents{}, nil) + } } dirlist.Invalidate() }) |