From a5c046efe3af8f1b3c94c9d83c214c77fa9f6697 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Fri, 28 Jan 2022 10:17:13 +0100 Subject: dirlist: use shorter delay before listing directory contents 1 second is a bit excessive. Use 200ms which should cover most quick folder changes. Add an option to make that delay configurable by the users. References: https://todo.sr.ht/~rjarry/aerc/16 Fixes: cb3090956cfd ("dirlist: skip unnecessary change-folder action") Suggested-by: Koni Marti Signed-off-by: Robin Jarry --- widgets/dirlist.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'widgets/dirlist.go') diff --git a/widgets/dirlist.go b/widgets/dirlist.go index 53afc1dd..6f8869d5 100644 --- a/widgets/dirlist.go +++ b/widgets/dirlist.go @@ -96,7 +96,7 @@ func (dirlist *DirectoryList) Select(name string) { go func() { select { - case <-time.After(1 * time.Second): + case <-time.After(dirlist.aercConf.Ui.DirListDelay): dirlist.worker.PostAction(&types.OpenDirectory{Directory: name}, func(msg types.WorkerMessage) { switch msg.(type) { -- cgit