diff options
author | Robin Jarry <robin@jarry.cc> | 2022-01-28 10:17:13 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-01-29 22:01:25 +0100 |
commit | a5c046efe3af8f1b3c94c9d83c214c77fa9f6697 (patch) | |
tree | cd7bb3950d7c0c87a671d01a07293f1ab0bcc3e8 /widgets | |
parent | cdec23323c644b1805ca9cca138e7fa91be6ab6d (diff) | |
download | aerc-a5c046efe3af8f1b3c94c9d83c214c77fa9f6697.zip |
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 <koni.marti@gmail.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/dirlist.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/dirlist.go b/widgets/dirlist.go index 53afc1d..6f8869d 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) { |